State pattern
Design pattern that allows an object to alter its behavior when its internal state changes, e.g. a strategy pattern, akin to finite-state machines
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.
Nº Q230866 ★
Common · Knowledge
State pattern
Design pattern that allows an object to alter its behavior when its internal state changes, e.g. a strategy pattern, akin to finite-state machines
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.
Last price
—
Floor price
—
7-day median
—
30-day sales
0
30-day range
—
In circulation
0
Price history
median
low – high
sales
No sales in this period
Show table
| Date | median | Low | High | sales |
|---|
Sales history
- Last sale
- —
- 30-day average
- —
- 30-day low
- —
- 30-day high
- —
- Sales 7d
- 0
- Sales 30d
- 0
No sales yet.
Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.
From Wikipedia
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. The state pattern is used in computer programming to encapsulate varying behavior for the same object, based on its internal state. This can be a cleaner way for an object to change its behavior at runtime without resorting to conditional statements and thus improve maintainability.
Text: Wikipédia, CC BY-SA 4.0. · Image: State_Design_Pattern_UML_Class_Diagram.png: JoaoTrindade (ta... (CC BY-SA 3.0) ·
Related cards
Strategy pattern
Design pattern enabling selection of algorithms at runtime
Nº Q775349 ★★
Command pattern
Behavioral design pattern
Nº Q386776 ★
Decorator pattern
Design pattern in object-oriented programming
Nº Q23839 ★★
Facade pattern
Software design pattern that provides a simplified interface
Nº Q428170 ★★
Circuit breaker design pattern
Behavioral design pattern in software development
Nº Q5121595 ★
Software design pattern
Reusable solution to a commonly occurring software problem
Nº Q181156 ★★★