T - the source element typeU - the result element typepublic final class Collect<U,T> extends java.lang.Object implements CloseableIterable<U>
| Modifier and Type | Field and Description |
|---|---|
protected Func0<? extends U> |
initialCollector
The initial collector function.
|
protected Func2<? super U,? super T,? extends U> |
merge
The merger function.
|
protected Func1<? super U,? extends U> |
newCollector
The new collector function based on the current collector.
|
protected Observable<? extends T> |
source
The source sequence.
|
| Constructor and Description |
|---|
Collect(Observable<? extends T> source,
Func0<? extends U> initialCollector,
Func2<? super U,? super T,? extends U> merge,
Func1<? super U,? extends U> newCollector)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CloseableIterator<U> |
iterator() |
protected final Observable<? extends T> source
protected final Func1<? super U,? extends U> newCollector
protected final Func0<? extends U> initialCollector
public Collect(Observable<? extends T> source, Func0<? extends U> initialCollector, Func2<? super U,? super T,? extends U> merge, Func1<? super U,? extends U> newCollector)
source - the source sequenceinitialCollector - the initial collector factorymerge - the merger operatornewCollector - the factory to replace the current collectorpublic CloseableIterator<U> iterator()
iterator in interface CloseableIterable<U>iterator in interface java.lang.Iterable<U>