| Package | Description |
|---|---|
| com.codename1.util |
General utilities classes
|
| com.codename1.util.promise |
| Modifier and Type | Method and Description |
|---|---|
Promise<V> |
AsyncResource.asPromise()
Wraps this AsyncResource object as a
Promise |
| Modifier and Type | Method and Description |
|---|---|
static Promise |
Promise.all(Promise... promises)
The Promise.all() method takes an iterable of promises as an input, and returns a single Promise that resolves to an array of the results of the input promises.
|
static Promise |
Promise.allSettled(Promise... promises)
The Promise.allSettled() method returns a promise that resolves after all
of the given promises have either fulfilled or rejected, with an array of
objects that each describes the outcome of each promise.
|
Promise |
Promise.always(Functor handlerFunc)
Implementation of Promise.finally().
|
Promise |
Promise.except(Functor<Throwable,?> rejectionFunc)
Implementation of Promise.catch().
|
Promise |
Promise.onComplete(SuccessCallback handlerFunc)
|
Promise |
Promise.onFail(SuccessCallback<Throwable> rejectionFunc)
|
Promise |
Promise.onSuccess(SuccessCallback<T> resolutionFunc)
|
static <V> Promise<V> |
Promise.promisify(AsyncResource<V> res) |
Promise |
Promise.ready(SuccessCallback<T> resolutionFunc,
SuccessCallback<Throwable> rejectionFunc)
|
static Promise |
Promise.reject(Throwable err) |
static <V> Promise<V> |
Promise.resolve(V value) |
Promise |
Promise.then(Functor<T,?> resolutionFunc) |
Promise |
Promise.then(Functor<T,?> resolutionFunc,
Functor<Throwable,?> rejectionFunc)
The then() method returns a Promise.
|
| Modifier and Type | Method and Description |
|---|---|
static Promise |
Promise.all(Promise... promises)
The Promise.all() method takes an iterable of promises as an input, and returns a single Promise that resolves to an array of the results of the input promises.
|
static Promise |
Promise.allSettled(Promise... promises)
The Promise.allSettled() method returns a promise that resolves after all
of the given promises have either fulfilled or rejected, with an array of
objects that each describes the outcome of each promise.
|
Copyright © 2023. All rights reserved.