|Re: [Acceleo] select over a Set(String) object [message #904802 is a reply to message #904558]
||Wed, 29 August 2012 07:24
|| Laurent Goubet
Registered: July 2009
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')]
. This same syntax exists for all 'iteration' operation : select, reject, collect, exists, forAll, isUnique, one, any and sortedBy.
variable.operation(iterator | body)
Though of course, "includes" is better if you only need to check whether you set contains a given value.
Powered by FUDForum
. Page generated in 0.07113 seconds