State Pattern
Intent:
Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.
See also:
StrategyPattern
,
DynamicClassification
,
RunAndReturnSuccessor
,
ContextParameter
DualityBetweenStateAndClass
gives a more philosophical discussion of why an object's "state" deserves to be modeled in a separate class.
http://home.earthlink.net/~huston2/dp/state.html
http://wiki.cs.uiuc.edu/patternStories/StatePattern
(
BrokenLink
- not working 20071203)
In Chapter 9 of
PatternLanguagesOfProgramDesign
volume three,
PaulDyson
and
BruceAnderson
present seven "state" patterns in a
PatternLanguage
, explaining the costs and benefits of various implementation strategies of this pattern. (
CategoryGroupsOfPatterns
)
See also(?):
ClientState
CategoryPattern
|
CategoryBehavioralPatterns
EditText
of this page (last edited
July 27, 2008
)
FindPage
by searching (or browse
LikePages
or take a
VisualTour
)