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
public abstract class YieldingSequenceBase<T> extends Object implements Sequence<T>
A Sequence that is based entirely on the Yielder implementation. This is a base class to simplify the creation of Sequences.
-
-
Constructor Summary
Constructors Constructor Description YieldingSequenceBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <OutType> OutType
accumulate(OutType initValue, Accumulator<OutType,T> accumulator)
Accumulate this sequence using the given accumulator.
-
-
-
Method Detail
-
accumulate
public <OutType> OutType accumulate(OutType initValue, Accumulator<OutType,T> accumulator)
Description copied from interface:Sequence
Accumulate this sequence using the given accumulator.- Specified by:
accumulate
in 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.
-
-