Skip to content
Buy me a coffee

StreamBuilder

Defined in: src/stream/Stream.ts:100

Builds a Stream by adding elements one at a time, then calling build() once. Returned by Stream.builder().

T

accept(t): void

Defined in: src/stream/Stream.ts:105

Adds an element (null allowed).

T

void

IllegalStateException after build()


add(t): StreamBuilder<T>

Defined in: src/stream/Stream.ts:110

Adds an element and returns this builder, for chaining.

T

StreamBuilder<T>

IllegalStateException after build()


build(): Stream<T>

Defined in: src/stream/Stream.ts:115

Returns an ordered, sized stream of the added elements in insertion order. The builder can then no longer be used.

Stream<T>

IllegalStateException if already built