mjedynak / builder-generator-idea-plugin

MIT License
151 stars 75 forks source link

What is but method? #46

Closed yonesko closed 4 years ago

yonesko commented 6 years ago

It seems useless.

Second question: do you have prototype builder? EntityBuilder that sets filelds in its constructor from Entity?

BehindTheFacade commented 5 years ago

MyObjectBuilder builder = new MyObjectBuilder.aMyObject().withThis("this").withThat("that"); MyObject firstObject = builder.build(); MyObject secondObject = builder.but().withThis("this_property_is_different_but_that_property_is_the_same").build()

Just allows you to essentially create multiple objects from the same base builder, but, with some different properties.