|
Re: Collection sorting: msg#00187lang.groovy.user
It can take a closure of 1 argument, in which case the closure acts as a transformer to the thing which should be compared, or 2 arguments, in which case the closure acts like a regular comparator. people.sort { it.name } or people.sort { a, b | return a.name <=> b.name } On 29 Nov 2004, at 12:09, Babelex wrote: Hi all James ------- http://radio.weblogs.com/0112098/
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Collection sorting, Babelex |
|---|---|
| Next by Date: | Re: Collection sorting, Babelex |
| Previous by Thread: | Collection sorting, Babelex |
| Next by Thread: | Re: Collection sorting, Babelex |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |