|
|
|
|
|
| Re: [Acceleo] select over a Set(String) object [message #904802 is a reply to message #904558] |
Wed, 29 August 2012 03:24  |
Laurent Goubet Messages: 1548 Registered: July 2009 |
Senior Member |
|
|
Andrea,
Ed's answer is right, I'll just add that you can also use iterators in select and reject operations with the same syntax he has outlined for "exists" :
[setOfString->select(s : String | s = 'test')]
i.e : variable.operation(iterator | body) . This same syntax exists for all 'iteration' operation : select, reject, collect, exists, forAll, isUnique, one, any and sortedBy.
Though of course, "includes" is better if you only need to check whether you set contains a given value.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.01624 seconds