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, JOIN, 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()keep(String, String)-buffer._addAss(item)once per drained element, for the buffer of a stage: a stage never drops an unset element (KeepsUnsetElements, true for every buffering stage;append(int, String, String)asks it), orpipe(String, String)-buffer._pipe(item), which drops an unset value - only where the drained value can never be unset (a group/split bucket)iterate(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 TypeMethodDescriptionTHE append for the buffer of a stage:keep(String, String)when the stage keeps unset elements (KeepsUnsetElements), otherwisepipe(String, String).create()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._addAss(item)- append one drained element AS IT IS, unset or not:+=stores what it is given, where|drops an unset value.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. -
keep
buffer._addAss(item)- append one drained element AS IT IS, unset or not:+=stores what it is given, where|drops an unset value. For the buffer of a stage: a stage never drops an unset element (Steve, 2026-10-21; D24: a sort places them after every group). A TERMINAL into a List appends the same way (KeepsUnsetIntoList, emitted byAbstractStreamStageGenerator.generateTerminalPipeagainst the parameterised List itself, not this raw buffer). -
append
THE append for the buffer of a stage:keep(String, String)when the stage keeps unset elements (KeepsUnsetElements), otherwisepipe(String, String). -
iterate
buffer.iterator()- iterate the drained buffer to emit downstream.
-