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 evaluationcallResult- what the helper'shasNext()call returned - already a primitive; with no demand bounds it is alsohasNextVarhasNextVar- the result, already a primitive boolean - no_true()needed; with demand bounds it is the foldedc < l AND ... hasNext()
record DrainCondition(String scopeId, List<IRInstr> instructions, String callResult, String hasNextVar)
extends Record
The evaluated
hasNext() condition of a drain loop: its own scope, the instructions that
compute it, the variable the helper's hasNext() call wrote and the primitive-boolean variable
the loop branches on. All of them are needed to build the enclosing while loop, so they come back together.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecallResultrecord 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 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 componentcallResult- the value for thecallResultrecord 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
-
callResult
Returns the value of thecallResultrecord component.- Returns:
- the value of the
callResultrecord component
-
hasNextVar
Returns the value of thehasNextVarrecord component.- Returns:
- the value of the
hasNextVarrecord component
-