mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 10:58:42 +00:00
docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox
This commit is contained in:
@@ -35,6 +35,10 @@ Wikipedia says
|
||||
|
||||
> The Step Builder pattern is a variation of the Builder design pattern, designed to provide a flexible solution for constructing complex objects step-by-step. This pattern is particularly useful when an object requires multiple initialization steps, which can be done incrementally to ensure clarity and flexibility in the creation process.
|
||||
|
||||
Sequence diagram
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of Step Builder Pattern in Java
|
||||
|
||||
The Step Builder pattern in Java is an extension of the Builder pattern that guides the user through the creation of an object in a step-by-step manner. This pattern improves the user experience by only showing the next step methods available, and not showing the build method until it's the right time to build the object.
|
||||
@@ -162,10 +166,6 @@ Console output:
|
||||
12:58:13.889 [main] INFO com.iluwatar.stepbuilder.App -- This is a Rogue named Desmond armed with a with nothing.
|
||||
```
|
||||
|
||||
## Detailed Explanation of Step Builder Pattern with Real-World Examples
|
||||
|
||||

|
||||
|
||||
## When to Use the Step Builder Pattern in Java
|
||||
|
||||
The Step Builder pattern in Java is used
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Reference in New Issue
Block a user