Record Class Ir.Model
java.lang.Object
java.lang.Record
org.clafer.frontend.Ir.Model
- Record Components:
span- the whole sourceoptions- the options of the first lineelements- the top-level clafers, enumerations and constraintsobjectives- the objectivesassertions- the assertions, quantified at the top level
- All Implemented Interfaces:
Ir.Node
- Enclosing class:
Ir
public static record Ir.Model(SourceSpan span, Ir.Options options, List<Ir.Element> elements, List<Ir.Objective> objectives, List<Ir.Assertion> assertions)
extends Record
implements Ir.Node
A model: its declarations and constraints in the order they were
written, then its objectives and assertions, which the compiler prints
at the end.
-
Constructor Summary
ConstructorsConstructorDescriptionModel(SourceSpan span, Ir.Options options, List<Ir.Element> elements, List<Ir.Objective> objectives, List<Ir.Assertion> assertions) Creates an instance of aModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassertionsrecord component.elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theobjectivesrecord component.options()Returns the value of theoptionsrecord component.span()Returns the value of thespanrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Model
public Model(SourceSpan span, Ir.Options options, List<Ir.Element> elements, List<Ir.Objective> objectives, List<Ir.Assertion> assertions) Creates an instance of aModelrecord class.- Parameters:
span- the value for thespanrecord componentoptions- the value for theoptionsrecord componentelements- the value for theelementsrecord componentobjectives- the value for theobjectivesrecord componentassertions- the value for theassertionsrecord component
-
-
Method Details
-
toString
-
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). -
span
-
options
-
elements
-
objectives
Returns the value of theobjectivesrecord component.- Returns:
- the value of the
objectivesrecord component
-
assertions
Returns the value of theassertionsrecord component.- Returns:
- the value of the
assertionsrecord component
-