CompletableFutureCompat

class CompletableFutureCompat<V> : Future<V>

A backport of Java CompletableFuture which works with old Androids.

Constructors

CompletableFutureCompat
Link copied to clipboard
fun CompletableFutureCompat()

Functions

cancel
Link copied to clipboard
open override fun cancel(mayInterruptIfRunning: Boolean): Boolean

If not already completed, completes this CompletableFuture with a CancellationException.

complete
Link copied to clipboard
fun complete(value: V): Boolean

If not already completed, sets the value returned by get and related methods to the given value.

completeExceptionally
Link copied to clipboard
fun completeExceptionally(ex: Throwable): Boolean

If not already completed, causes invocations of get and related methods to throw the given exception.

get
Link copied to clipboard
open override fun get(): V
open operator override fun get(timeout: Long, unit: TimeUnit): V
isCancelled
Link copied to clipboard
open override fun isCancelled(): Boolean
isDone
Link copied to clipboard
open override fun isDone(): Boolean