DEV Community

Discussion on: Building Generic Payloads with the Builder Pattern in Java

Collapse
 
siy profile image
Sergiy Yevtushenko

There is a Fluent Builder pattern, suitable for cases when all (or majority) of parameters are required. You may find interesting this article.

Thread Thread
 
parthasutradhar profile image
Partha Sutradhar • Edited

Yes, Step Builder will force client to provide datum.

Thread Thread
 
siy profile image
Sergiy Yevtushenko

Moreover, this pattern enforces order in which fields are assigned. This is helpful in many situations, especially when changes in code are compared.