Monthly Archives: June 2010

“Functional programming” with google-collection API (now guava)

I was messing around with the google collection API. It has the ability to do functional-like programming. When using inner classes where you should use closures, one looks forward to Java with closures. import java.util.Collection; import java.util.Set; import org.junit.Test; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.Collections2; import com.google.common.collect.ImmutableSet; public class GoogleCollectionTest { public static class Employee […]