vertx / io.vertx.rxjava.core / Future / map

# map

`open fun <U : Any> map(mapper: Function<T, U>): Future<U>`

Apply a `mapper` function on this future.

When this future succeeds, the `mapper` will be called with the completed value and this mapper returns a value. This value will complete the future returned by this method call.

If the `mapper` throws an exception, the returned future will be failed with this exception.

When this future fails, the failure will be propagated to the returned future and the `mapper` will not be called.

### Parameters

`mapper` - the mapper function

Return
the mapped future

`open fun <V : Any> map(value: V): Future<V>`

Map the result of a future to a specific `value`.

When this future succeeds, this `value` will complete the future returned by this method call.

When this future fails, the failure will be propagated to the returned future.

### Parameters

`value` - the value that eventually completes the mapped future

Return
the mapped future