Module org.kink_lang.kink
Record Class BranchWithElseItree
java.lang.Object
java.lang.Record
org.kink_lang.kink.internal.program.itree.BranchWithElseItree
- Record Components:
condThenPairs
- cond-then pairs.elseThenFun
- the else body corresponding to $true.pos
- the pos index of this itree.
public record BranchWithElseItree(List<CondThenPair> condThenPairs, FastFunItree elseThenFun, int pos)
extends Record
implements Itree
Invocation of branch in the following form.
branch( { cond1 } { then1 } { cond2 } { then2 } $true { elseThen } )
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.kink_lang.kink.internal.program.itree.ItreeElem
ItreeElem.Spread
-
Constructor Summary
ConstructorDescriptionBranchWithElseItree
(List<CondThenPair> condThenPairs, FastFunItree elseThenFun, int pos) Makes a branch invocation itree with an else block. -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(ItreeVisitor<T> visitor) Accepts a visitor.Returns the value of thecondThenPairs
record component.Returns the value of theelseThenFun
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
pos()
Returns the value of thepos
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
BranchWithElseItree
Makes a branch invocation itree with an else block.- Parameters:
condThenPairs
- cond-then pairs.elseThenFun
- the else body corresponding to $true.pos
- the pos index of this itree.
-
-
Method Details
-
accept
Description copied from interface:Itree
Accepts a visitor. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
condThenPairs
Returns the value of thecondThenPairs
record component.- Returns:
- the value of the
condThenPairs
record component
-
elseThenFun
Returns the value of theelseThenFun
record component.- Returns:
- the value of the
elseThenFun
record component
-
pos
public int pos()Returns the value of thepos
record component.
-