Move from Java to Scala