Record Class IncrementParams

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.support.IncrementParams
Record Components:
counterVar - Variable name holding the current counter value
operator - Increment operator ("++") or decrement operator ("--")
counterType - Type of the counter variable
incrementResultTemp - Temporary variable for increment/decrement result
scopeId - Scope ID for memory management
debugInfo - Debug information for instructions

public record IncrementParams(String counterVar, String operator, ISymbol counterType, String incrementResultTemp, String scopeId, DebugInfo debugInfo) extends Record
Parameters for increment/decrement evaluation.

Encapsulates all data needed to perform an increment or decrement operation and update the loop counter variable.

  • Constructor Details

    • IncrementParams

      public IncrementParams(String counterVar, String operator, ISymbol counterType, String incrementResultTemp, String scopeId, DebugInfo debugInfo)
      Creates an instance of a IncrementParams record class.
      Parameters:
      counterVar - the value for the counterVar record component
      operator - the value for the operator record component
      counterType - the value for the counterType record component
      incrementResultTemp - the value for the incrementResultTemp 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.
    • counterVar

      public String counterVar()
      Returns the value of the counterVar record component.
      Returns:
      the value of the counterVar record component
    • operator

      public String operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component
    • counterType

      public ISymbol counterType()
      Returns the value of the counterType record component.
      Returns:
      the value of the counterType record component
    • incrementResultTemp

      public String incrementResultTemp()
      Returns the value of the incrementResultTemp record component.
      Returns:
      the value of the incrementResultTemp 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