Record Class ConceptualAccess.OrderingStep

java.lang.Object
java.lang.Record
org.ek9lang.compiler.support.ConceptualAccess.OrderingStep
Record Components:
body - the method or function the step is written in
inOwnComparison - true when that body is the generic's own hand-written self-comparison <=>
into - the method or function the values are handed on to; null when the body orders them
intoParameter - the type parameter they become in into; null when the body orders them
Enclosing class:
ConceptualAccess

public static record ConceptualAccess.OrderingStep(IScopedSymbol body, boolean inOwnComparison, IScopedSymbol into, ISymbol intoParameter) extends Record
One step towards a <=> on a bare type parameter, recorded on that parameter (D89, D91 step 4): the body of a method or function orders the parameter's values itself (into null - a <=> on them, or a value given to a function delegate), or hands them on to another body that may (into, whose own parameter intoParameter they become - the generic's own method, the same parameter; a generic function, the type parameter they are bound to). Read only by TypeParameterOrderedInOwnComparison, from the steps written in the generic's own hand-written <=>.
  • Constructor Details

    • OrderingStep

      public OrderingStep(IScopedSymbol body, boolean inOwnComparison, IScopedSymbol into, ISymbol intoParameter)
      Creates an instance of a OrderingStep record class.
      Parameters:
      body - the value for the body record component
      inOwnComparison - the value for the inOwnComparison record component
      into - the value for the into record component
      intoParameter - the value for the intoParameter 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • body

      public IScopedSymbol body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • inOwnComparison

      public boolean inOwnComparison()
      Returns the value of the inOwnComparison record component.
      Returns:
      the value of the inOwnComparison record component
    • into

      public IScopedSymbol into()
      Returns the value of the into record component.
      Returns:
      the value of the into record component
    • intoParameter

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