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:

    There is such a thing as caste, even in the West; but it is comparatively faint; it is conservatism here. It says, forsake not your calling, outrage no institution, use no violence, rend no bonds; the State is thy parent. Its virtue or manhood is wholly filial.
    Henry David Thoreau (1817–1862)

    We took advantage of [the Indians’] ignorance and inexperience to incline them the more easily toward treachery, lewdness, avarice, and every sort of inhumanity and cruelty, after the example and pattern of our ways.
    Michel de Montaigne (1533–1592)