Record Class DirectionCheckParams

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.support.DirectionCheckParams
Record Components:
directionTemp - Variable holding the direction value (from start <=> end)
comparisonOperator - Comparison operator ("<" for ascending, ">" for descending)
zeroTemp - Temporary variable for literal 0
booleanObjectTemp - Temporary variable for EK9 Boolean comparison result
primitiveBooleanTemp - Temporary variable for primitive boolean result
integerType - EK9 Integer type symbol
booleanType - EK9 Boolean type symbol
scopeId - Scope ID for memory management
debugInfo - Debug information for instructions

public record DirectionCheckParams(String directionTemp, String comparisonOperator, String zeroTemp, String booleanObjectTemp, String primitiveBooleanTemp, ISymbol integerType, ISymbol booleanType, String scopeId, DebugInfo debugInfo) extends Record
Parameters for direction check evaluation.

Encapsulates all data needed to build direction check IR for polymorphic for-range loops (direction < 0 or direction > 0).

  • Constructor Details

    • DirectionCheckParams

      public DirectionCheckParams(String directionTemp, String comparisonOperator, String zeroTemp, String booleanObjectTemp, String primitiveBooleanTemp, ISymbol integerType, ISymbol booleanType, String scopeId, DebugInfo debugInfo)
      Creates an instance of a DirectionCheckParams record class.
      Parameters:
      directionTemp - the value for the directionTemp record component
      comparisonOperator - the value for the comparisonOperator record component
      zeroTemp - the value for the zeroTemp record component
      booleanObjectTemp - the value for the booleanObjectTemp record component
      primitiveBooleanTemp - the value for the primitiveBooleanTemp record component
      integerType - the value for the integerType record component
      booleanType - the value for the booleanType record component
      scopeId - the value for the scopeId record component
      debugInfo - the value for the debugInfo record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • directionTemp

      public String directionTemp()
      Returns the value of the directionTemp record component.
      Returns:
      the value of the directionTemp record component
    • comparisonOperator

      public String comparisonOperator()
      Returns the value of the comparisonOperator record component.
      Returns:
      the value of the comparisonOperator record component
    • zeroTemp

      public String zeroTemp()
      Returns the value of the zeroTemp record component.
      Returns:
      the value of the zeroTemp record component
    • booleanObjectTemp

      public String booleanObjectTemp()
      Returns the value of the booleanObjectTemp record component.
      Returns:
      the value of the booleanObjectTemp record component
    • primitiveBooleanTemp

      public String primitiveBooleanTemp()
      Returns the value of the primitiveBooleanTemp record component.
      Returns:
      the value of the primitiveBooleanTemp record component
    • integerType

      public ISymbol integerType()
      Returns the value of the integerType record component.
      Returns:
      the value of the integerType record component
    • booleanType

      public ISymbol booleanType()
      Returns the value of the booleanType record component.
      Returns:
      the value of the booleanType record component
    • scopeId

      public String scopeId()
      Returns the value of the scopeId record component.
      Returns:
      the value of the scopeId record component
    • debugInfo

      public DebugInfo debugInfo()
      Returns the value of the debugInfo record component.
      Returns:
      the value of the debugInfo record component