Class ListBufferCalls
java.lang.Object
org.ek9lang.compiler.phase7.support.ListBufferCalls
THE call shapes for the raw
org.ek9.lang::List buffer that stream pipeline staging
drains into - use these, do not hand-roll a fourth variant.
A buffering stage (SORT, GROUP, SPLIT, TAIL, ASYNC) cannot emit downstream until it has seen the
whole stream, so the pipeline materialises into a buffer and then iterates it. That buffer is
always the RAW List - never the parameterised wrapper - because a pre-built type such as
List of String would need private delegate-field access. Three shapes make up the whole
protocol, and every buffering stage uses all three in the same order:
create()-new org.ek9.lang::List()pipe(String, String)-buffer._pipe(item)once per drained elementiterate(String)-buffer.iterator()to emit downstream
The call metadata is owned here rather than passed in: these are all the same three calls on the same type, so their metadata is by definition identical and belongs in one place.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()new org.ek9.lang::List()- an empty raw buffer typed as the List itself.new org.ek9.lang::List()where the buffer is immediately viewed asreturnTypeName- used where the drain target is declared at the collection type the stage produces rather than at the raw List.buffer.iterator()- iterate the drained buffer to emit downstream.buffer._pipe(item)- append one drained element.
-
Constructor Details
-
ListBufferCalls
-
-
Method Details
-
create
new org.ek9.lang::List()- an empty raw buffer typed as the List itself. -
create
new org.ek9.lang::List()where the buffer is immediately viewed asreturnTypeName- used where the drain target is declared at the collection type the stage produces rather than at the raw List. -
pipe
buffer._pipe(item)- append one drained element. TakesAnybecause the buffer is raw, and returns Void. -
iterate
buffer.iterator()- iterate the drained buffer to emit downstream.
-