Modifier and Type | Class and Description |
---|---|
static interface |
Promise.CatchOnRejectedCallbackFn<V> |
static interface |
Promise.PromiseExecutorCallbackFn<T> |
static interface |
Promise.ResolveValueUnionType<V> |
IThenable.ThenOnFulfilledCallbackFn<T,V>, IThenable.ThenOnRejectedCallbackFn<V>
Constructor and Description |
---|
Promise(Promise.PromiseExecutorCallbackFn<T> executor) |
Modifier and Type | Method and Description |
---|---|
static <V> Promise<V[]> |
all(IThenable<? extends V>... promises) |
<V> Promise<V> |
catch_(Promise.CatchOnRejectedCallbackFn<? extends V> onRejected) |
static <V> Promise<V> |
race(IThenable<? extends V>... promises) |
static Promise<java.lang.Object> |
reject(java.lang.Object error) |
static <V> Promise<V> |
resolve(IThenable<V> value) |
static <V> Promise<V> |
resolve(Promise.ResolveValueUnionType<V> value) |
static <V> Promise<V> |
resolve(V value) |
<V> Promise<V> |
then(IThenable.ThenOnFulfilledCallbackFn<? super T,? extends V> onFulfilled) |
<V> Promise<V> |
then(IThenable.ThenOnFulfilledCallbackFn<? super T,? extends V> onFulfilled,
IThenable.ThenOnRejectedCallbackFn<? extends V> onRejected) |
public Promise(Promise.PromiseExecutorCallbackFn<T> executor)
public static Promise<java.lang.Object> reject(java.lang.Object error)
public static <V> Promise<V> resolve(Promise.ResolveValueUnionType<V> value)
public static final <V> Promise<V> resolve(V value)
public <V> Promise<V> catch_(Promise.CatchOnRejectedCallbackFn<? extends V> onRejected)
public <V> Promise<V> then(IThenable.ThenOnFulfilledCallbackFn<? super T,? extends V> onFulfilled, IThenable.ThenOnRejectedCallbackFn<? extends V> onRejected)