Record Class StreamSource

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.StreamSource
Record Components:
iteratorSetup - the iterator being consumed, with its collection metadata
elementType - the type of element flowing out of it
sourceUnbounded - true when the source may never terminate, so it cannot be fully drained

record StreamSource(IteratorSetup iteratorSetup, ISymbol elementType, boolean sourceUnbounded) extends Record
What a pipeline is reading from: the iterator, the type of element it yields, and whether that source can go on forever.

These three are asked for together by every buffering stage, because the decision each makes turns on all three at once - an unbounded source cannot be drained into a buffer, so group/split/sort must either window it or reject it.

  • Constructor Details

    • StreamSource

      StreamSource(IteratorSetup iteratorSetup, ISymbol elementType, boolean sourceUnbounded)
      Creates an instance of a StreamSource record class.
      Parameters:
      iteratorSetup - the value for the iteratorSetup record component
      elementType - the value for the elementType record component
      sourceUnbounded - the value for the sourceUnbounded 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.
    • iteratorSetup

      public IteratorSetup iteratorSetup()
      Returns the value of the iteratorSetup record component.
      Returns:
      the value of the iteratorSetup record component
    • elementType

      public ISymbol elementType()
      Returns the value of the elementType record component.
      Returns:
      the value of the elementType record component
    • sourceUnbounded

      public boolean sourceUnbounded()
      Returns the value of the sourceUnbounded record component.
      Returns:
      the value of the sourceUnbounded record component