E.g.
instead of...
Iterables.filter( foos, new Predicate<Foo>...
we could do...
Iterables.filter( foos, #( Foo f )( f.isBar() ) )
If we have 'method pointers', then can we get something even
cleaner...
Iterables.filter( foos, Foo.isBar )
Assuming Java7 gets some kind of closure,
--
Google Collections Library - users list
http://groups.google.com/group/google-collections-dev?hl=en
To unsubscribe, send email to:
google-collections...@googlegroups.com
As a result, JDK7 will have it's release delayed a bit. To that end, I
wouldn't split hairs about the usage of closures in place of
Predicates / Functions for the moment. I would, however, assume that
the changes required to go to closures wouldn't be a difficult thing
to do.
You can keep an eye on the "straw-man" proposal [3] in the OpenJDK
project (I'm not sure if this is the official project name yet)
[1] http://blogs.sun.com/mr/entry/closures_qa
[2] http://blogs.sun.com/mr/entry/closures
[3] http://cr.openjdk.java.net/~mr/lambda/straw-man/
Regards.
Closures will be added in JDK7. The announcement came in at Devoxx
this year [1][2].
I intend to raise the subject on the open JDK mailing lists of which
of our filter/transform-type methods ought to be in the JDK if the JDK
gets closures.
> --
> Google Collections Library - users list
> http://groups.google.com/group/google-collections-dev?hl=en
>
> To unsubscribe, send email to:
> google-collections...@googlegroups.com
>
--
Kevin Bourrillion @ Google
internal: http://go/javalibraries
external: guava-libraries.googlecode.com
I intend to raise the subject on the open JDK mailing lists of which
of our filter/transform-type methods ought to be in the JDK if the JDK
gets closures.