windowWithCount method
- @deprecated
Deprecated: Please use windowCount
Creates an Observable where each item is a Stream
containing the items
from the source sequence, in batches of count
.
If skip
is provided, each group will start where the previous group
ended minus the skip
value.
Example
Observable.range(1, 4)
.windowCount(2)
.doOnData((_) => print('next window'))
.flatMap((s) => s)
.listen(print); // prints next window 1, 2, next window 3, 4
Example with skip
Observable.range(1, 4)
.windowCount(2, 1)
.doOnData((_) => print('next window'))
.flatMap((s) => s)
.listen(print); // prints next window 1, 2, next window 2, 3, next window 3, 4, next window 4
Implementation
@deprecated
Observable<Stream<T>> windowWithCount(int count, [int skip]) =>
transform(new WindowStreamTransformer<T>(onCount(count, skip)));