Record Class DrainCondition
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.DrainCondition
- Record Components:
scopeId- the condition's own scope, entered and exited by the instructionsinstructions- the condition evaluationhasNextVar- the result, already a primitive boolean - no_true()needed
The evaluated
hasNext() condition of a drain loop: its own scope, the instructions that
compute it, and the primitive-boolean variable holding the answer. All three are needed to build
the enclosing while loop, so they come back together.-
Constructor Summary
ConstructorsConstructorDescriptionDrainCondition(String scopeId, List<IRInstr> instructions, String hasNextVar) Creates an instance of aDrainConditionrecord 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.Returns the value of thehasNextVarrecord component.Returns the value of theinstructionsrecord component.scopeId()Returns the value of thescopeIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DrainCondition
Creates an instance of aDrainConditionrecord class.- Parameters:
scopeId- the value for thescopeIdrecord componentinstructions- the value for theinstructionsrecord componenthasNextVar- the value for thehasNextVarrecord 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). -
scopeId
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
hasNextVar
Returns the value of thehasNextVarrecord component.- Returns:
- the value of the
hasNextVarrecord component
-