RxJava2窗口,带指示器的缓冲区

时间:2018-11-26 07:17:00

标签: java rx-java2 reactive-streams

[ "start-a", "during-a", "end-a", "start-b", "end-b", "start-c", "something-c", "something-more-c", "end-c"]

像上层数组一样使用String Stream尝试像结果下一样分隔元素start-* ~ end-*

["start-a", "during-a", "end-a"]
["start-b", "end-b"]
["start-c", "something-c", "end-c"]

我正在尝试使用窗口运算符

    @CheckReturnValue
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, V> Flowable<Flowable<T>> window(
            Publisher<U> openingIndicator,
            Function<? super U, ? extends Publisher<V>> closingIndicator) {
        return window(openingIndicator, closingIndicator, bufferSize());
    }

有使用窗口运算符(openingIndicator,closeingIndicator)的示例吗?

0 个答案:

没有答案