HomeServicesBlogDictionariesContactSpanish Course
← Back to search

Meaning of class invariant | Babel Free

Noun CEFR B2

Definitions

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

Examples

“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.”

CEFR level

B2
Upper Intermediate
This word is part of the CEFR B2 vocabulary — upper intermediate level.
See all B2 English words →

See also

Learn this word in context

See class invariant used in real conversations inside our free language course.

Start Free Course

Know this word better than we do? Language is a living thing — help us keep it growing. Collaborate with Babel Free