State Pattern
← Back to Behavioral Patterns
Object behavior changes based on internal state. Allow an object to alter its behavior when its internal state changes. The object will appear to change its class, replacing conditional logic with polymorphic state objects.
Key Properties
Related
- Strategy (similar structure, different intent)
- Finite State Machines (mathematical model)