#97 Conversion from Groovy to Java