| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Disposable | |
| public static Disposable | Returns: a new, non-disposed Disposable instanceReturns a new, non-disposed Disposable instance. |
| public static Disposable | Returns: the new Disposable instancethe Action to wrap run)Construct a Disposable by wrapping a Action that is executed exactly once when the Disposable is disposed. |
| public static Disposable | Returns: the new Disposable instancethe Future to wrap future)Construct a Disposable by wrapping a Future that is cancelled exactly once when the Disposable is disposed. |
| public static Disposable | Returns: the new Disposable instancethe Future to wrap future, boolean if true, the future cancel happens via Future.cancel(true) allowInterrupt)Construct a Disposable by wrapping a Future that is cancelled exactly once when the Disposable is disposed. |
| public static Disposable | Returns: the new Disposable instancethe Runnable to wrap run)Construct a Disposable by wrapping a Runnable that is executed exactly once when the Disposable is disposed. |
| public static Disposable | Returns: the new Disposable instancethe Runnable to wrap subscription)Construct a Disposable by wrapping a Subscription that is cancelled exactly once when the Disposable is disposed. |
| Disposables | back to summary |
|---|---|
| private Disposables() Utility class. | |
| disposed | back to summary |
|---|---|
| public static Disposable disposed() Returns a disposed Disposable instance.
| |
| empty | back to summary |
|---|---|
| public static Disposable empty() Returns a new, non-disposed Disposable instance.
| |
| fromAction | back to summary |
|---|---|
| public static Disposable fromAction(Action run) Construct a Disposable by wrapping a Action that is executed exactly once when the Disposable is disposed.
| |
| fromFuture | back to summary |
|---|---|
| public static Disposable fromFuture(Future<?> future) Construct a Disposable by wrapping a Future that is cancelled exactly once when the Disposable is disposed.
| |
| fromFuture | back to summary |
|---|---|
| public static Disposable fromFuture(Future<?> future, boolean allowInterrupt) Construct a Disposable by wrapping a Future that is cancelled exactly once when the Disposable is disposed.
| |
| fromRunnable | back to summary |
|---|---|
| public static Disposable fromRunnable(Runnable run) Construct a Disposable by wrapping a Runnable that is executed exactly once when the Disposable is disposed.
| |
| fromSubscription | back to summary |
|---|---|
| public static Disposable fromSubscription(Subscription subscription) Construct a Disposable by wrapping a Subscription that is cancelled exactly once when the Disposable is disposed.
| |