public interface LazyStream<U> extends BlockingStream<U>
Modifier and Type | Method and Description |
---|---|
default <R> R |
collect(java.util.function.Supplier<R> supplier,
java.util.function.BiConsumer<R,? super U> accumulator,
java.util.function.BiConsumer<R,R> combiner) |
default void |
forEach(java.util.function.Consumer<? super U> c) |
java.util.Optional<java.util.function.Consumer<java.lang.Throwable>> |
getErrorHandler() |
LazyStreamWrapper<U> |
getLastActive() |
java.util.function.Supplier<LazyResultConsumer<U>> |
getLazyCollector() |
MaxActive |
getMaxActive() |
ParallelReductionConfig |
getParallelReduction() |
java.util.Iterator<U> |
iterator() |
default java.util.Optional<U> |
reduce(java.util.function.BinaryOperator<U> accumulator) |
default <T> T |
reduce(T identity,
java.util.function.BiFunction<T,? super U,T> accumulator,
java.util.function.BinaryOperator<T> combiner) |
default U |
reduce(U identity,
java.util.function.BinaryOperator<U> accumulator) |
default void |
run()
Trigger a lazy stream as a task on the provided Executor
|
default <A,R> R |
run(java.util.stream.Collector<U,A,R> collector)
Trigger a lazy stream and return the results in the Collection created by
the collector
|
default Continuation |
runContinuation(java.lang.Runnable r) |
default void |
runOnCurrent()
Trigger a lazy stream
|
default void |
runThread(java.lang.Runnable r) |
block, block
LazyStreamWrapper<U> getLastActive()
getLastActive
in interface BlockingStream<U>
java.util.function.Supplier<LazyResultConsumer<U>> getLazyCollector()
java.util.Optional<java.util.function.Consumer<java.lang.Throwable>> getErrorHandler()
getErrorHandler
in interface BlockingStream<U>
ParallelReductionConfig getParallelReduction()
MaxActive getMaxActive()
java.util.Iterator<U> iterator()
default void run()
default void runThread(java.lang.Runnable r)
default Continuation runContinuation(java.lang.Runnable r)
default void runOnCurrent()
default <A,R> R run(java.util.stream.Collector<U,A,R> collector)
collector
- Supplier that creates a collection to store results indefault void forEach(java.util.function.Consumer<? super U> c)
default <T> T reduce(T identity, java.util.function.BiFunction<T,? super U,T> accumulator, java.util.function.BinaryOperator<T> combiner)
default <R> R collect(java.util.function.Supplier<R> supplier, java.util.function.BiConsumer<R,? super U> accumulator, java.util.function.BiConsumer<R,R> combiner)