When I use anonymous classes for small operations like filtering a collection, there is memory allocation for a new anonymous class instance or closure in Java 8.
String firstNonEmpty = Lists.find(list, new Predicate<String>(){
public String apply(String s){ return !s.isEmpty();}
});
Should I reuse such a predicate or a closure in Java 8? Always/in a cycle/in a GC-free method?