Object invariant

From Wikipedia, the free encyclopedia

An object invariant, or representation invariant, is an object-oriented programming construct consisting of a set of invariant properties that remain uncompromised regardless of the state of the object. This ensures that the object will always meet predefined conditions, and that methods may, therefore, always reference the object without the risk of making inaccurate presumptions.

[edit] See also