A snippet emulating a lambda expression for Java 7-