Scala, Design Patterns, Programming, Builder Pattern, Coding.
=:= HasTitle): BookBuilder[HasAuthor] = { new BookBuilder[HasAuthor](this.title, author, this.price) } def setPrice(price: Double): BookBuilder[SatisfiedConstraint] = { new BookBuilder[SatisfiedConstraint](this.title, this.author, price) } The BookBuilder has also a build method, that after