State Pattern

The state pattern, which closely resembles Strategy Pattern, is a behavioral software design pattern, also known as the objects for states pattern. This pattern is used in computer programming to represent the state of an object. This is a clean way for an object to partially change its type at runtime.

Other articles related to "state pattern, state":

State Pattern - Example - Java
... The state interface and two implementations ... The state's method has a reference to the context object and is able to change its state ... interface Statelike { /** * Writer method for the state name ...

Famous quotes containing the words pattern and/or state:

    Swift while the woof is whole,
    turn now my spirit, swift,
    and tear the pattern there,
    the flowers so deftly wrought,
    the border of sea-blue,
    the sea-blue coast of home.
    Hilda Doolittle (1886–1961)

    Wherever the State touches the personal life of the infant, the child, the youth, or the aged, helpless, defective in mind, body or moral nature, there the State enters “woman’s peculiar sphere,” her sphere of motherly succor and training, her sphere of sympathetic and self-sacrificing ministration to individual lives.
    Anna Garlin Spencer (1851–1931)