this thread along with this blog Show very great examples of how to implement generic-builder but both of them assume that all fields are optional. in the builder pattern we use builderclass for the optional fields while all required fields should be added in the constructor of the class itself.
My question how to implement a generic builder that force to add values for required fields.
Aucun commentaire:
Enregistrer un commentaire