Record Class HelperSource

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.HelperSource
Record Components:
variable - the variable holding the helper
typeName - the helper's type
hasNextMethod - its "is there another" method; answers a primitive boolean
nextMethod - its "take the next" method; answers Any

record HelperSource(String variable, String typeName, String hasNextMethod, String nextMethod) extends Record
A runtime helper a stream loop drains - the async executor, a group/split tracker's stored buckets, the tail buffer: the variable holding it, its type and its hasNext/next pair. Every helper drain loop is StreamPipelineMachinery.helperDrainLoop(HelperSource, String, String, List, Supplier, DebugInfo) over one of these.
  • Constructor Details

    • HelperSource

      HelperSource(String variable, String typeName, String hasNextMethod, String nextMethod)
      Creates an instance of a HelperSource record class.
      Parameters:
      variable - the value for the variable record component
      typeName - the value for the typeName record component
      hasNextMethod - the value for the hasNextMethod record component
      nextMethod - the value for the nextMethod record component
  • Method Details

    • asyncResults

      static HelperSource asyncResults(String executorVar)
      The async executor's results, in completion order.
    • buckets

      static HelperSource buckets(String trackerVar, String trackerTypeName)
      The buckets a group or split tracker stored during its drain.
    • tailBuffer

      static HelperSource tailBuffer(String tailBufferVar)
      The last N elements the tail buffer kept.
    • 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.
    • variable

      public String variable()
      Returns the value of the variable record component.
      Returns:
      the value of the variable record component
    • typeName

      public String typeName()
      Returns the value of the typeName record component.
      Returns:
      the value of the typeName record component
    • hasNextMethod

      public String hasNextMethod()
      Returns the value of the hasNextMethod record component.
      Returns:
      the value of the hasNextMethod record component
    • nextMethod

      public String nextMethod()
      Returns the value of the nextMethod record component.
      Returns:
      the value of the nextMethod record component