Interface Pipeline<T>


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 Details

    • root

      Class<T> 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

      void terminatingOperation(TerminalOperation<?,?> terminalOperation)
    • isParallel

      boolean isParallel()
      Returns whether this pipeline, if a terminal operation were to be executed, would execute in parallel.
      Returns:
      true if 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:
      true if this pipeline would execute unordered if executed
    • ordered

      void ordered(boolean flag)
      Sets if this Pipeline is ordered.
      Parameters:
      flag - true if the Pipeline is ordered, false if the Pipeline is unordered
    • closeHandlers

      List<Runnable> closeHandlers()
      Returns the close handlers for the pipeline.
      Returns:
      the close handler for the pipeline