Lambdas in Java Preview — part I
stronglytypedblog.blogspot.com
stronglytypedblog.blogspot.com
public static File[] fileFilter(File dir, #boolean(File) matcher) {
return dir.listFiles(new FileFilter() {
public boolean accept(File file) {
return matcher.(f);
}
});
}
Or am I way off? I realize that it's moot, with the SAM types support that he's mentioning. Seems pretty nice.On the whole it looks kind of verbose to me, and way uglier than in C#, but Java seems to me to at least be improving.