当前位置: 首页>>代码示例>>Java>>正文


Java BlockingOperatorNext类代码示例

本文整理汇总了Java中rx.internal.operators.BlockingOperatorNext的典型用法代码示例。如果您正苦于以下问题:Java BlockingOperatorNext类的具体用法?Java BlockingOperatorNext怎么用?Java BlockingOperatorNext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BlockingOperatorNext类属于rx.internal.operators包,在下文中一共展示了BlockingOperatorNext类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testSingleSourceManyIterators

import rx.internal.operators.BlockingOperatorNext; //导入依赖的package包/类
@Test /* (timeout = 8000) */
public void testSingleSourceManyIterators() throws InterruptedException {
    Observable<Long> o = Observable.interval(100, TimeUnit.MILLISECONDS);
    PublishSubject<Void> terminal = PublishSubject.create();
    BlockingObservable<Long> source = o.takeUntil(terminal).toBlocking();

    Iterable<Long> iter = source.next();

    for (int j = 0; j < 3; j++) {
        BlockingOperatorNext.NextIterator<Long> it = (BlockingOperatorNext.NextIterator<Long>)iter.iterator();

        for (long i = 0; i < 10; i++) {
            Assert.assertEquals(true, it.hasNext());
            Assert.assertEquals(j + "th iteration next", Long.valueOf(i), it.next());
        }
        terminal.onNext(null);
    }
}
 
开发者ID:akarnokd,项目名称:RxJavaFlow,代码行数:19,代码来源:BlockingOperatorNextTest.java

示例2: next

import rx.internal.operators.BlockingOperatorNext; //导入依赖的package包/类
public Iterable<T> next() {
    return BlockingOperatorNext.next(this.o);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:BlockingObservable.java

示例3: next

import rx.internal.operators.BlockingOperatorNext; //导入依赖的package包/类
/**
 * Returns an {@link Iterable} that blocks until this {@code BlockingObservable} emits another item, then
 * returns that item.
 * <p>
 * <img width="640" height="490" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.next.png" alt="">
 * 
 * @return an {@link Iterable} that blocks upon each iteration until this {@code BlockingObservable} emits
 *         a new item, whereupon the Iterable returns that item
 * @see <a href="https://github.com/Netflix/RxJava/wiki/Blocking-Observable-Operators#next">RxJava Wiki: next()</a>
 * @see <a href="http://msdn.microsoft.com/en-us/library/hh211897.aspx">MSDN: Observable.Next</a>
 */
public Iterable<T> next() {
    return BlockingOperatorNext.next(o);
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:15,代码来源:BlockingObservable.java


注:本文中的rx.internal.operators.BlockingOperatorNext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。