Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computer
programming, specifically object-oriented programming, a class invariant
is an invariant used to constrain objects of a class. Methods of the
class should preserve the invariant. The class invariant constrains the
state stored in the object. Class invariants are established during
construction and constantly maintained between calls to public methods.
Temporary breaking of class invariance between private method calls is
possible, although not encouraged.