Record Class CloseableArgumentKeeping.Holder

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.CloseableArgumentKeeping.Holder
Enclosing class:
CloseableArgumentKeeping

static record CloseableArgumentKeeping.Holder(ScopedSymbol callable, ISymbol symbol) extends Record
A variable of one callable's body - one of its parameters, or a local that may refer to the same object - compared by identity.
  • Constructor Details

    • Holder

      Holder(ScopedSymbol callable, ISymbol symbol)
      Creates an instance of a Holder record class.
      Parameters:
      callable - the value for the callable record component
      symbol - the value for the symbol record component
  • Method Details

    • of

      static CloseableArgumentKeeping.Holder of(ScopedSymbol callable, ISymbol symbol)
    • equals

      public boolean equals(Object other)
      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:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public 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
    • 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
    • callable

      public ScopedSymbol callable()
      Returns the value of the callable record component.
      Returns:
      the value of the callable record component
    • symbol

      public ISymbol symbol()
      Returns the value of the symbol record component.
      Returns:
      the value of the symbol record component