language-icon Old Web
English
Sign In

Class invariant

In computer programming, specifically object-oriented programming, a class invariant (or type 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. In computer programming, specifically object-oriented programming, a class invariant (or type 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.

[ "Invariant (mathematics)", "Object-oriented programming", "Programming language", "Pure mathematics" ]
Parent Topic
Child Topic
    No Parent Topic