Modifier and Type | Method and Description |
---|---|
<OutType> OutType |
accumulate(OutType initValue,
Accumulator<OutType,T> accumulator)
Accumulate this sequence using the given accumulator.
|
static <T> CombiningSequence<T> |
create(Sequence<T> baseSequence,
com.google.common.collect.Ordering<T> ordering,
BinaryFn<T,T,T> mergeFn) |
<OutType> Yielder<OutType> |
toYielder(OutType initValue,
YieldingAccumulator<OutType,T> accumulator)
Return an Yielder for accumulated sequence.
|
public static <T> CombiningSequence<T> create(Sequence<T> baseSequence, com.google.common.collect.Ordering<T> ordering, BinaryFn<T,T,T> mergeFn)
public <OutType> OutType accumulate(OutType initValue, Accumulator<OutType,T> accumulator)
Sequence
accumulate
in interface Sequence<T>
OutType
- the type of accumulated value.initValue
- the initial value to pass along to start the accumulation.accumulator
- the accumulator which is responsible for accumulating input values.public <OutType> Yielder<OutType> toYielder(OutType initValue, YieldingAccumulator<OutType,T> accumulator)
Sequence
toYielder
in interface Sequence<T>
OutType
- the type of accumulated value.initValue
- the initial value to pass along to start the accumulation.accumulator
- the accumulator which is responsible for accumulating input values.Yielder
Copyright © 2011–2017. All rights reserved.