GroupList
The GroupList class represents an ordered collection of Group objects.
class GroupList
info
This class cannot be instantiated directly. Instances are returned by Instrument.groups.
Properties
length
length: Int { get }
The number of groups in the list.
Methods
at
at(index: Int) -> (Group) [subscript]
Returns the Group at the given index. Throws an error if the index is out of range.
While at can be called as a regular method, it also enables the subscript operator, so both forms are equivalent:
var group = group_list.at(0)
var group = group_list[0]
iterator
iterator() -> (GroupListIterator)
Returns a GroupListIterator for iterating over all groups in the list. In practice, you will rarely need to call this method directly. Its main purpose is to enable the for-in loop syntax:
for group in group_list {
// ...
}