3 ms·
I wrote a blog post with a nearly identical example. http://jaydonnell.com/blog/2011/08/07/is-your-idea-clealry-expressed-in-your-code/ http://jaydonnell.com/b
by jshen 15y ago
I wrote a blog post with a nearly identical example.
http://jaydonnell.com/blog/2011/08/07/is-your-idea-clealry-expressed-in-your-code/ http://jaydonnell.com/blog/2011/08/07/is-your-idea-clealry-e...
The code gets nutty when you have to do multiple transforms on collections. There are some libraries in Java which make it more bearable.
http://code.google.com/p/lambdaj/ http://code.google.com/p/lambdaj/
List<Person> sortedByAgePersons = sort(persons, on(Person.class).getAge());