class invariant

Hello, you have come here looking for the meaning of the word class invariant. In DICTIOUS you will not only get to know all the dictionary meanings for the word class invariant, but we will also tell you about its etymology, its characteristics and you will know how to say class invariant in singular and plural. Everything you need to know about the word class invariant you have here. The definition of the word class invariant will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofclass invariant, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

English

English Wikipedia has an article on:
Wikipedia

Noun

class invariant (plural class invariants)

  1. (object-oriented programming) An invariant used to constrain objects of a class that is preserved by class methods and that constrains the state stored in the object.
    Synonym: (more generally) type invariant
    • 2000, Meilir Page-Jones, Fundamentals of Object-oriented Design in UML, Addison-Wesley Professional, →ISBN, page 272:
      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.

See also