T - the buffered value typepublic final class OperatorBufferWithSize<T> extends java.lang.Object implements Observable.Operator<java.util.List<T>,T>
Observable source and stores them in all active chunks until the buffer
contains a specified number of elements. The buffer is then emitted. Chunks are created after a certain
amount of values have been received. When the source Observable completes or produces an error,
the currently active chunks are emitted, and the event is propagated to all subscribed Subscribers.
Note that this operation can produce non-connected, connected non-overlapping, or overlapping chunks depending on the input parameters.
| Constructor and Description |
|---|
OperatorBufferWithSize(int count,
int skip) |
| Modifier and Type | Method and Description |
|---|---|
Subscriber<? super T> |
call(Subscriber<? super java.util.List<T>> child) |
public OperatorBufferWithSize(int count,
int skip)
count - the number of elements a buffer should have before being emittedskip - the interval with which chunks have to be created. Note that when skip == count
the operator will produce non-overlapping chunks. If
skip < count, this buffer operation will produce overlapping chunks and if
skip > count non-overlapping chunks will be created and some values will not be pushed
into a buffer at all!public Subscriber<? super T> call(Subscriber<? super java.util.List<T>> child)
call in interface Func1<Subscriber<? super java.util.List<T>>,Subscriber<? super T>>