本文整理汇总了Java中rx.internal.util.SubscriptionList类的典型用法代码示例。如果您正苦于以下问题:Java SubscriptionList类的具体用法?Java SubscriptionList怎么用?Java SubscriptionList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SubscriptionList类属于rx.internal.util包,在下文中一共展示了SubscriptionList类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scheduleActual
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
public ScheduledAction scheduleActual(Action0 action, long delayTime, TimeUnit unit, SubscriptionList parent) {
Future f;
ScheduledAction run = new ScheduledAction(this.schedulersHook.onSchedule(action), parent);
parent.add(run);
if (delayTime <= 0) {
f = this.executor.submit(run);
} else {
f = this.executor.schedule(run, delayTime, unit);
}
run.add(f);
return run;
}
示例2: bindViewModel
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
private void bindViewModel() {
subscriptionList = new SubscriptionList();
subscriptionList.add(clicks(findViewById(R.id.add_button)).subscribe(aVoid -> addItemViewModel.addItemClicked()));
subscriptionList.add(clicks(findViewById(R.id.cancel_button)).subscribe(aVoid -> addItemViewModel.cancelClicked()));
subscriptionList.add(getTextChangeObservable(R.id.content).subscribe(addItemViewModel::contentTextChanged));
subscriptionList.add(getTextChangeObservable(R.id.detail).subscribe(addItemViewModel::detailTextChanged));
subscriptionList.add(addItemViewModel.addButtonEnabled().subscribe(enabled(findViewById(R.id.add_button))));
}
示例3: onCreate
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewModel = Shank.provideNew(ItemsListViewModel.class, this);
setContentView(R.layout.activity_item_list);
setUpToolbar();
setupRecyclerView((RecyclerView) findViewById(R.id.item_list));
subscriptionList = new SubscriptionList();
subscriptionList.add(clicks(findViewById(R.id.fab)).subscribe(aVoid -> viewModel.addItemClicked()));
subscriptionList.add(viewModel.itemModels().subscribe(this::showItems));
}
示例4: Animator
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
public Animator(MapContent map, Model model, View view) {
this.map = map;
this.model = model;
this.view = view;
// default to Australia centred region
bounds = new ReferencedEnvelope(90, 175, -50, 0, DefaultGeographicCRS.WGS84);
subscriptions = new SubscriptionList();
worker = Schedulers.newThread().createWorker();
subscriptions.add(worker);
}
示例5: Remover2
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
public Remover2(ScheduledAction s, SubscriptionList parent) {
this.s = s;
this.parent = parent;
}
示例6: ScheduledAction
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
public ScheduledAction(Action0 action) {
this.action = action;
this.cancel = new SubscriptionList();
}
示例7: addParent
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
public void addParent(SubscriptionList parent) {
this.cancel.add(new Remover2(this, parent));
}
示例8: Subscriber
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
protected Subscriber(Subscriber<?> subscriber, boolean shareSubscriptions) {
this.requested = NOT_SET.longValue();
this.subscriber = subscriber;
SubscriptionList subscriptionList = (!shareSubscriptions || subscriber == null) ? new SubscriptionList() : subscriber.subscriptions;
this.subscriptions = subscriptionList;
}
示例9: BiSubscriber
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
protected BiSubscriber() {
this.op = null;
this.cs = new SubscriptionList();
}
示例10: ScheduledExecutorServiceWorker
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
public ScheduledExecutorServiceWorker(EventExecutor scheduledExecutor) {
this.scheduledExecutor = scheduledExecutor;
serial = new SubscriptionList();
timed = new CompositeSubscription();
both = new SubscriptionList(serial, timed);
}
示例11: Subscriber
import rx.internal.util.SubscriptionList; //导入依赖的package包/类
@Deprecated
protected Subscriber(CompositeSubscription cs) {
this.op = null;
this.cs = new SubscriptionList();
add(cs);
}