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:

    If, during his daily walk, he met any children flying kites, playing marbles, or whirling peg tops, he would buy the toys from them and exhort them not to gamble or indulge in vain sport.
    —For the State of Rhode Island, U.S. public relief program (1935-1943)

    The worthiest man to be known, and for a pattern to be presented to the world, he is the man of whom we have most certain knowledge. He hath been declared and enlightened by the most clear-seeing men that ever were; the testimonies we have of him are in faithfulness and sufficiency most admirable.
    Michel de Montaigne (1533–1592)