T - the type of the valuesU - the type of the intermediate sum valueV - the type of the final average valuepublic static final class Aggregate.SeededIndexedProjected<V,T,U> extends java.lang.Object implements Observable<V>
| Constructor and Description |
|---|
SeededIndexedProjected(Observable<? extends T> source,
U seed,
Func2<? super U,? super T,? extends U> accumulator,
Func2<? super U,? super java.lang.Integer,? extends V> divide) |
| Modifier and Type | Method and Description |
|---|---|
java.io.Closeable |
register(Observer<? super V> observer)
Registers an observer for the notification of Ts.
|
public SeededIndexedProjected(Observable<? extends T> source, U seed, Func2<? super U,? super T,? extends U> accumulator, Func2<? super U,? super java.lang.Integer,? extends V> divide)
source - the source of BigDecimals to aggregate.seed - the initieal value for the aggregationaccumulator - the function which accumulates the input Ts. The first received T will be accompanied by a null U.divide - the function which perform the final division based on the number of elements@Nonnull
public java.io.Closeable register(@Nonnull
Observer<? super V> observer)
Observableregister in interface Observable<V>observer - the observer of Ts or any supertype of it