出典:Wiktionary
出典:Wikipedia
出典:『Wikipedia』 (2011/03/09 09:24 UTC 版)
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.