In one of my recent grails project, I had requirement to get unique objects from list based on more than one field. Now this can be done by passing list to closure unique .
I had list of dates of couple of years ,and what I needed was unique combination of month and year.
List<Date> dates date.unique{[it.month,it.year]}
_________________________________
Hitesh Bhatia
Mail
LinkedIn,Facebook,Twitter
_________________________________
