I've come across the following situation a lot of times. I call a method that takes a function object, such as: public void method(Function a) { a.doSomething ...