|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrx.operators.OperationScan
public final class OperationScan
Returns an Observable that applies a function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by an Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations.
This sort of function is sometimes called an accumulator.
Note that when you pass a seed to scan() the resulting Observable will emit that
seed as its first emitted item.
| Constructor Summary | |
|---|---|
OperationScan()
|
|
| Method Summary | ||
|---|---|---|
static
|
scan(Observable<? extends T> sequence,
Func2<T,T,T> accumulator)
Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source and accumulator. |
|
static
|
scan(Observable<? extends T> sequence,
R initialValue,
Func2<R,? super T,R> accumulator)
Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source and accumulator. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationScan()
| Method Detail |
|---|
public static <T,R> Observable.OnSubscribeFunc<R> scan(Observable<? extends T> sequence,
R initialValue,
Func2<R,? super T,R> accumulator)
sequence - An observable sequence of elements to project.initialValue - The initial (seed) accumulator value.accumulator - An accumulator function to be invoked on each element from the sequence.
public static <T> Observable.OnSubscribeFunc<T> scan(Observable<? extends T> sequence,
Func2<T,T,T> accumulator)
sequence - An observable sequence of elements to project.accumulator - An accumulator function to be invoked on each element from the sequence.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||