Builder Library for Scala and Java
问题 I need a builder library that can be called from Scala and Java. Easy enough in Scala using default, named parameters. But how do I call this code from Java? See below. Or perhaps I should go with a fluent API that is more common to both languages? Scala: case class Person(gender:Gender.Value, firstName:String, lastName:String){ def fullName = lastName+", "+firstName override def toString = firstName+","+lastName+","+gender } case class PersonBob( gender:Gender = GenderBob().build, firstName