OCLOperators at0
Created by Alexandra on 2017-08-13 · Last edited by Colline.ssali on 2025-12-12.
at0 ( index : Integer ) : T
Returns the element of self at the *index* position.
Note! 0-based index.
| Expression | Result |
|---|---|
| Sequence{'a', 'b'}->at0(1) | b |
It returns the element in the collection using zero-based indexing. This means at0(0) returns the first element, at0(1) returns the second, and so on. It is especially useful when working with Sequences or when converting your instance collections into sequences using asSequence() or similar operators.
Example:
Department.allInstances->at0(0)Results

