本文整理了Java中io.reactivex.Observable.skipUntil()
方法的一些代码示例,展示了Observable.skipUntil()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Observable.skipUntil()
方法的具体详情如下:
包路径:io.reactivex.Observable
类名称:Observable
方法名:skipUntil
[英]Returns an Observable that skips items emitted by the source ObservableSource until a second ObservableSource emits an item.
Scheduler: skipUntil does not operate by default on a particular Scheduler.
[中]
代码示例来源:origin: ReactiveX/RxJava
@Override
public ObservableSource<Object> apply(Observable<Object> o) throws Exception {
return o.skipUntil(Observable.never());
}
});
代码示例来源:origin: ReactiveX/RxJava
@Test(expected = NullPointerException.class)
public void skipUntilNull() {
just1.skipUntil(null);
}
代码示例来源:origin: ReactiveX/RxJava
@Override
public ObservableSource<Object> apply(Observable<Object> o) throws Exception {
return Observable.never().skipUntil(o);
}
});
代码示例来源:origin: ReactiveX/RxJava
/**
* Returns an Observable that skips values emitted by the source ObservableSource before a specified time window
* on a specified {@link Scheduler} elapses.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/skip.ts.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use for the timed skipping</dd>
* </dl>
*
* @param time
* the length of the time window to skip
* @param unit
* the time unit of {@code time}
* @param scheduler
* the {@link Scheduler} on which the timed wait happens
* @return an Observable that skips values emitted by the source ObservableSource before the time window defined
* by {@code time} and {@code scheduler} elapses, and then emits the remainder
* @see <a href="http://reactivex.io/documentation/operators/skip.html">ReactiveX operators documentation: Skip</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Observable<T> skip(long time, TimeUnit unit, Scheduler scheduler) {
return skipUntil(timer(time, unit, scheduler));
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Returns an Observable that skips values emitted by the source ObservableSource before a specified time window
* elapses.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/skip.t.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code skip} does not operate on any particular scheduler but uses the current time
* from the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param time
* the length of the time window to skip
* @param unit
* the time unit of {@code time}
* @return an Observable that skips values emitted by the source ObservableSource before the time window defined
* by {@code time} elapses and the emits the remainder
* @see <a href="http://reactivex.io/documentation/operators/skip.html">ReactiveX operators documentation: Skip</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public final Observable<T> skip(long time, TimeUnit unit) {
return skipUntil(timer(time, unit));
}
代码示例来源:origin: redisson/redisson
/**
* Returns an Observable that skips values emitted by the source ObservableSource before a specified time window
* on a specified {@link Scheduler} elapses.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/skip.ts.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use for the timed skipping</dd>
* </dl>
*
* @param time
* the length of the time window to skip
* @param unit
* the time unit of {@code time}
* @param scheduler
* the {@link Scheduler} on which the timed wait happens
* @return an Observable that skips values emitted by the source ObservableSource before the time window defined
* by {@code time} and {@code scheduler} elapses, and then emits the remainder
* @see <a href="http://reactivex.io/documentation/operators/skip.html">ReactiveX operators documentation: Skip</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Observable<T> skip(long time, TimeUnit unit, Scheduler scheduler) {
return skipUntil(timer(time, unit, scheduler));
}
代码示例来源:origin: redisson/redisson
/**
* Returns an Observable that skips values emitted by the source ObservableSource before a specified time window
* elapses.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/skip.t.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code skip} does not operate on any particular scheduler but uses the current time
* from the {@code computation} {@link Scheduler}.</dd>
* </dl>
*
* @param time
* the length of the time window to skip
* @param unit
* the time unit of {@code time}
* @return an Observable that skips values emitted by the source ObservableSource before the time window defined
* by {@code time} elapses and the emits the remainder
* @see <a href="http://reactivex.io/documentation/operators/skip.html">ReactiveX operators documentation: Skip</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public final Observable<T> skip(long time, TimeUnit unit) {
return skipUntil(timer(time, unit));
}
内容来源于网络,如有侵权,请联系作者删除!