AsyncResult.otherwise

Apply a {@code mapper} function on this async result.<p>

The {@code mapper} is called with the failure and this mapper returns a value. This value will complete the result returned by this method call.<p>

When this async result is succeeded, the value will be propagated to the returned async result and the {@code mapper} will not be called.

@param mapper the mapper function @return the mapped async result

  1. AsyncResult!(T) otherwise(Function!(Throwable, T) mapper)
    interface AsyncResult(T)
    final
    otherwise
    (
    Function!(Throwable, T) mapper
    )
  2. AsyncResult!(T) otherwise(T value)

Meta