UniqueCollection<T>

UniqueCollection<T>

The UniqueCollection type provides the shared functionality of the OrderedSet and Set collections for which the elements are unique. The common supertype of UniqueCollection is Collection.

conformsTo Collection<T>

Iterations

sortedBy(i : T | body : Lambda T() : OclAny) : OrderedSet<T>

Results in the ordered set containing all elements of the source collection. The element for which body has the lowest value comes first, and so on. The type of the body expression must have the < operation defined. The < operation must return a Boolean value and must be transitive (i.e., if a < b and b < c, then a < c).