Lambda functions, or more specifically the lack of it has always been an annoyance in Java. The closest alternative has been implementation of interfaces as an anonymous class. Here is an example: IntelliJ does a nice folding of this code to give an illusion of closures. This makes reading of the code a little more fun as seen here: