public interface Pipeline<T>
Mutable Pipeline containing root (source),
intermediate and terminating operations of
a Stream.
This class is not thread-safe.
- Author:
- Per Minborg
-
Method Summary
Modifier and TypeMethodDescriptionReturns the close handlers for the pipeline.Returns a mutable LinkedList of the intermediate operations in the pipeline.booleanReturns whether this pipeline, if a terminal operation were to be executed, would execute in parallel.booleanReturns whether this pipeline, if a terminal operation were to be executed, would execute unordered.voidordered(boolean flag) Sets if this Pipeline is ordered.voidparallel()Sets this Pipeline to parallel (not sequential).root()voidSets this Pipeline to sequential (not parallel).TerminalOperation<?,?> voidterminatingOperation(TerminalOperation<?, ?> terminalOperation)
-
Method Details
-
root
-
intermediateOperations
LinkedList<IntermediateOperation<?,?>> intermediateOperations()Returns a mutable LinkedList of the intermediate operations in the pipeline.- Returns:
- a mutable LinkedList of the intermediate operations in the pipeline
-
terminatingOperation
TerminalOperation<?,?> terminatingOperation() -
terminatingOperation
-
isParallel
boolean isParallel()Returns whether this pipeline, if a terminal operation were to be executed, would execute in parallel.- Returns:
trueif this pipeline would execute in parallel if executed
-
parallel
void parallel()Sets this Pipeline to parallel (not sequential). -
sequential
void sequential()Sets this Pipeline to sequential (not parallel). -
isUnordered
boolean isUnordered()Returns whether this pipeline, if a terminal operation were to be executed, would execute unordered.- Returns:
trueif this pipeline would execute unordered if executed
-
ordered
void ordered(boolean flag) Sets if this Pipeline is ordered.- Parameters:
flag-trueif the Pipeline is ordered,falseif the Pipeline is unordered
-
closeHandlers
Returns the close handlers for the pipeline.- Returns:
- the close handler for the pipeline
-