BufferWithCountStreamTransformer<T> class

Deprecated: Use BufferCountStreamTransformer

Creates an Observable where each item is a list 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

new Stream.fromIterable([1, 2, 3, 4])
  .transform(new BufferWithCountStreamTransformer(2))
  .listen(print); // prints [1, 2], [3, 4]

Example with skip

new Stream.fromIterable([1, 2, 3, 4])
  .transform(new BufferWithCountStreamTransformer(2, 1))
  .listen(print); // prints [1, 2], [2, 3], [3, 4], [4]
Annotations
  • @deprecated

Constructors

BufferWithCountStreamTransformer(int count, [int skip])

Properties

count → int
final
skip → int
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

bind(Stream<T> stream) → Stream<List<T>>
Transforms the provided stream. [...]
cast<RS, RT>() → StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Methods

assertCountAndSkip(int count, [int skip]) → void