implementing Java Api on top of Scala impl