OCLOperators last
This page was created by Alexandra on 2017-08-13. Last edited by Peter.byaruhanga on 2025-12-11.
last () : T
Returns the last element in the list operated on. The operand will be converted to a list prior to evaluating the operation.
| Expression | Result |
|---|---|
| OrderedSet{1, 2.0, '3'}->last() | '3' |
Example
Given a Class of Fruit
Fruit.allinstances->last
This is return the last element.
