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.

Famous quotes containing the words state and/or pattern:

    Alexander Woollcott broadcasts the story of the wife who returned a dog to the Seeing Eye with this note attached: “I am sending the dog back. My husband used to depend on me. Now he is independent, and I never know where he is.”
    —For the State of New Jersey, U.S. public relief program (1935-1943)

    It is a very true and expressive phrase, “He looked daggers at me,” for the first pattern and prototype of all daggers must have been a glance of the eye.... It is wonderful how we get about the streets without being wounded by these delicate and glancing weapons, a man can so nimbly whip out his rapier, or without being noticed carry it unsheathed. Yet it is rare that one gets seriously looked at.
    Henry David Thoreau (1817–1862)