Open dabraham02124 opened 11 years ago
+1 (though I'd prefer that the method be named builder())
That makes sense. I'd been reasoning by contrast with build(), but this method would be on the actual object, not the builder, so that makes sense to me.
In addition to all the neat stuff in the @Builder annotation, could you please add an unbuild method? This would create a builder based on the object in question. Thus if object personName1 has firstName = "John" and lastName = "Smith" you could do this:
personName2 = personName1.unbuild().lastName("Johnson").build();
yielding personName2 with firstName = "John" and lastName = "Johnson"
Also you could implement clone() pretty directly from this if you wanted.