public final class SubscriptionRandomList<T extends Subscription> extends java.lang.Object implements Subscription
| Constructor and Description |
|---|
SubscriptionRandomList() |
SubscriptionRandomList(T... subscriptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T s)
Adds a new
Subscription to this CompositeSubscription if the CompositeSubscription is not yet unsubscribed. |
void |
clear()
Unsubscribes any subscriptions that are currently part of this
CompositeSubscription and remove
them from the CompositeSubscription so that the CompositeSubscription is empty and in
an unoperative state. |
void |
forEach(Action1<T> action) |
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
void |
remove(Subscription s)
|
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
public SubscriptionRandomList()
public SubscriptionRandomList(T... subscriptions)
public boolean isUnsubscribed()
SubscriptionSubscription is currently unsubscribed.isUnsubscribed in interface Subscriptiontrue if this Subscription is currently unsubscribed, false otherwisepublic void add(T s)
Subscription to this CompositeSubscription if the CompositeSubscription is not yet unsubscribed. If the CompositeSubscription is
unsubscribed, add will indicate this by explicitly unsubscribing the new Subscription as
well.s - the Subscription to addpublic void remove(Subscription s)
s - the Subscription to removepublic void clear()
CompositeSubscription and remove
them from the CompositeSubscription so that the CompositeSubscription is empty and in
an unoperative state.public void unsubscribe()
SubscriptionSubscriber that was registered when this Subscription
was received.
This allows unregistering an Subscriber before it has finished receiving all events (i.e. before
onCompleted is called).
unsubscribe in interface Subscription