mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-06-03 18:13:30 +00:00
docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox
This commit is contained in:
@@ -38,6 +38,10 @@ Wikipedia says
|
||||
|
||||
> The state pattern is a behavioral software design pattern that allows an object to alter its behavior when its internal state changes. This pattern is close to the concept of finite-state machines. The state pattern can be interpreted as a strategy pattern, which is able to switch a strategy through invocations of methods defined in the pattern's interface.
|
||||
|
||||
Flowchart
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of State Pattern in Java
|
||||
|
||||
In our programmatic example there is a mammoth with alternating moods.
|
||||
|
||||
Reference in New Issue
Block a user