Record Class Ir.Binary
java.lang.Object
java.lang.Record
org.clafer.frontend.Ir.Binary
- Enclosing class:
Ir
public static record Ir.Binary(SourceSpan span, Ir.BinaryOp op, List<Ir.Exp> operands)
extends Record
implements Ir.Exp
A chain of one binary operator:
a op b op c. The compiler
prints two operands; chocosolver's printer chains the associative
ones.-
Constructor Summary
ConstructorsConstructorDescriptionBinary(SourceSpan span, Ir.BinaryOp op, List<Ir.Exp> operands) Creates an instance of aBinaryrecord 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.op()Returns the value of theoprecord component.operands()Returns the value of theoperandsrecord component.span()Returns the value of thespanrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Binary
Creates an instance of aBinaryrecord class.- Parameters:
span- the value for thespanrecord componentop- the value for theoprecord componentoperands- the value for theoperandsrecord 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
Returns the value of thespanrecord component. -
op
Returns the value of theoprecord component.- Returns:
- the value of the
oprecord component
-
operands
-