Record Class ClaferModel
java.lang.Object
java.lang.Record
org.clafer.ig.ClaferModel
- Record Components:
topLevel- the top-level clafers
An instance of a model, as claferIG's
ClaferModel.hs has it: its
top-level clafers, each with its children. A state of a trace is one too.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordAn instance of a clafer: its name, the UID of its clafer, its value (or null) and its children.static final recordThe tuple of name and ordinal is globally unique.static final recordstatic final recordstatic interfaceThe value of a clafer: a clafer it refers to, an integer or a string. -
Constructor Summary
ConstructorsConstructorDescriptionClaferModel(List<ClaferModel.Clafer> topLevel) Creates an instance of aClaferModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static StringThe text of a clafer and its children, asshowgives it.topLevel()Returns the value of thetopLevelrecord component.toString()The text of the instance: each clafer on a line, indented by its depth.traverse()All the clafers, each before its children.
-
Constructor Details
-
ClaferModel
Creates an instance of aClaferModelrecord class.- Parameters:
topLevel- the value for thetopLevelrecord component
-
-
Method Details
-
traverse
All the clafers, each before its children. -
toString
-
show
The text of a clafer and its children, asshowgives it. -
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
topLevel
-