List classes: ConnectionList, JobList

Due to implementation limitations Switch is unable to return an array of Connection, Job or Occurrence instances. Instead, it returns a helper object of the corresponding list class, that is, ConnectionList, JobList or OccurrenceList respectively.

These helper classes offer the following functions to access the items in the list.

getCount( ) : Number

Returns the number of items in the list (may be zero).

getItem( index : Number) : Connection or Job or Occurrence

Returns the item in the list at the specified (zero-based) index. If the index is out of range, the function returns null.

length : Number

This is a read-only property (rather than a function) that contains the value returned by getCount().

at( index : Number) : Connection or Job or Occurrence

Returns the same value as getItem(index).