|Re: How to retreive a list of attribut in a certain order [Solved] [message #873234 is a reply to message #872338]
||Thu, 17 May 2012 19:01
| Ed Willink
Registered: July 2009
asSet() will probably be quicker, since prior to sortedBy, ordering is
On 16/05/2012 00:36, Alain Lavoie wrote:
> Alain Lavoie a écrit :
>> I have to generate list of element (properties) in a given
>> order (doc and other requirements).
>> I have made multiple attempts without success. Here is what
>> I came from.
>> [let as : Set(Property) =
>> So, How can I get a list of properties (oclTypeOf(Property))
>> ordered by a choosen element (name, a guard, ...) ?
> Ok, finally, here is the solution:
> [let a : OrderedSet(Property) = b->select(p : Property |
> p.name.contains('keyword'))->asOrderedSet()->sortedBy(name) ]
Powered by FUDForum
. Page generated in 0.11242 seconds