本文整理了Java中io.reactivex.subjects.Subject.compose()
方法的一些代码示例,展示了Subject.compose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Subject.compose()
方法的具体详情如下:
包路径:io.reactivex.subjects.Subject
类名称:Subject
方法名:compose
暂无
代码示例来源:origin: io.reactivex.rxjava2/rxjavafx
/**
* Creates a new CompositeObservable with the provided transformations applied to the returned Observable
* yield from `toObservable()`. For instance, you can pass `obs -> obs.replay(1).refCount()` to make this CompositeObservable
* @param transformer
*/
public CompositeObservable(ObservableTransformer<T,T> transformer) {
subject = PublishSubject.<T>create().toSerialized();
if (transformer == null) {
output = subject;
} else {
output = subject.compose(transformer);
}
}
代码示例来源:origin: io.reactivex/rxjavafx
/**
* Creates a new CompositeObservable with the provided transformations applied to the returned Observable
* yield from `toObservable()`. For instance, you can pass `obs -> obs.replay(1).refCount()` to make this CompositeObservable
* @param transformer
*/
public CompositeObservable(ObservableTransformer<T,T> transformer) {
subject = PublishSubject.<T>create().toSerialized();
if (transformer == null) {
output = subject;
} else {
output = subject.compose(transformer);
}
}
代码示例来源:origin: sunfusheng/Gank.IO
private void prepareForExiting() {
lifecycle.throttleFirst(END_TIME_SECONDS, TimeUnit.SECONDS, AndroidSchedulers.mainThread())
.subscribe(it -> ToastUtil.toast(R.string.exit_tip), Throwable::printStackTrace);
lifecycle.compose(bindToLifecycle())
.timeInterval(AndroidSchedulers.mainThread())
.skip(1)
.filter(it -> it.time(TimeUnit.SECONDS) < END_TIME_SECONDS)
.subscribe(it -> finish(), Throwable::printStackTrace);
}
内容来源于网络,如有侵权,请联系作者删除!