Skip to content

ReferencePipeline

ReferencePipeline is an abstract base class found in the Java Stream API, serving as the foundational structure for pipeline stages within a stream operation.^[600-developer__java__java8__java8-Spliterator.md]

Class Definition

The class is formally defined as abstract class ReferencePipeline<P_IN, P_OUT> extends AbstractPipeline<P_IN, P_OUT, Stream<P_OUT>> implements Stream<P_OUT>.^[600-developer__java__java8__java8-Spliterator.md]

Functionality

ReferencePipeline is designed to act as an intermediate pipeline stage or a pipeline source stage.^[600-developer__java__java8__java8-Spliterator.md] It handles operations where the elements being processed are of a specific type, typically associated with collection or gathering operations.^[600-developer__java__java8__java8-Spliterator.md]

  • StatelessOp: An abstract static class that extends ReferencePipeline.^[600-developer__java__java8__java8-Spliterator.md] It serves as a base class specifically for stateless intermediate stages of a Stream.^[600-developer__java__java8__java8-Spliterator.md]
  • Spliterator: The ReferencePipeline is implemented alongside the Spliterator interface and the Spliterators utility class to manage stream traversal.^[600-developer__java__java8__java8-Spliterator.md]

Sources

  • 600-developer__java__java8__java8-Spliterator.md