Class YieldingSequenceBase<T>
java.lang.Object
org.apache.druid.java.util.common.guava.YieldingSequenceBase<T>
- All Implemented Interfaces:
Sequence<T>
- Direct Known Subclasses:
ExplodingSequence,MergeSequence,ParallelMergeCombiningSequence,ScanQueryOffsetSequence,SkippingSequence
A Sequence that is based entirely on the Yielder implementation.
This is a base class to simplify the creation of Sequences.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<OutType> OutTypeaccumulate(OutType initValue, Accumulator<OutType, T> accumulator) Accumulate this sequence using the given accumulator.
-
Constructor Details
-
YieldingSequenceBase
public YieldingSequenceBase()
-
-
Method Details
-
accumulate
Description copied from interface:SequenceAccumulate this sequence using the given accumulator.- Specified by:
accumulatein interfaceSequence<T>- Type Parameters:
OutType- the type of accumulated value.- Parameters:
initValue- the initial value to pass along to start the accumulation.accumulator- the accumulator which is responsible for accumulating input values.- Returns:
- accumulated value.
-