🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators orderGeneric

Sorts the list of properties with interchangeable sort order: (expr1, OclSortDirection::ascending, expr2, OclSortDirection::descending...)

Example

If we have a class Car with attributes Name and Country.

We can use orderGeneric like this.

Car.allInstances->orderGeneric(Name, OclSortDirection::ascending)
Error creating thumbnail: File missing