onTest<T, S> function

Stream<S> Function(Stream<T> stream, OnDataTransform<T, S> , OnDataTransform<S, S> ) onTest <T, S>(bool onTest(T event))

Higher order function implementation for _OnTestSampler which matches the method signature of buffer and window.

Each item is a sequence containing the items from the source sequence, batched whenever onTest passes.


Stream<S> Function(
        Stream<T> stream, OnDataTransform<T, S>, OnDataTransform<S, S>)
    onTest<T, S>(bool onTest(T event)) => (Stream<T> stream,
            OnDataTransform<T, S> bufferHandler,
            OnDataTransform<S, S> scheduleHandler) =>
        new _OnTestSampler<T, S>(
            stream, bufferHandler, scheduleHandler, onTest);