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:

    To the rulers of the state then, if to any, it belongs of right to use falsehood, to deceive either enemies or their own citizens, for the good of the state: and no one else may meddle with this privilege.
    Plato (c. 427–347 B.C.)

    No, I will be the pattern of all patience,
    I will say nothing.
    William Shakespeare (1564–1616)