class invariant

noun

An invariant used to constrain objects of a class that is preserved by class methods and that constrains the state stored in the object.

Similar
type invariant

Meanings

nounclass invariant (plural class invariants)

plural class invariants

  1. object-oriented programmingAn invariant used to constrain objects of a class that is preserved by class methods and that constrains the state stored in the object.

    Every object of a given class must satisfy the class's invariant. This invariant acts as a constraint, limiting the size of the class's state-space. A subclass both inherits the class invariant(s) of its superclass(es) and adds a further restriction of its own.

    2000, Meilir Page-Jones, Fundamentals of Object-oriented Design in UML, Addison-Wesley Professional, →ISBN, page 272

    Synonyms: type invariant

Synonyms & antonyms

nounAn invariant used to constrain objects of a class that is preserved by class methods and that constrains the state stored in the object.

Similar
type invariant
Cite this entry
APA

class invariant. (n.d.). In WatkinsX Dictionary. Retrieved November 4, 2026, from https://dictionary.watkinsx.com/word/class%20invariant

MLA

“class invariant.” WatkinsX Dictionary, https://dictionary.watkinsx.com/word/class%20invariant. Accessed November 4, 2026.

Chicago

WatkinsX Dictionary, s.v. “class invariant,” accessed November 4, 2026, https://dictionary.watkinsx.com/word/class%20invariant.

Source: class invariant on Wiktionary, CC BY-SA 4.0.