map


Description:

public Optional<A> map<A> (MapFunc<A,T> map_func)

Applies the given mapping function if the value is present.

Parameters:

map_func

The mapping function.

Returns:

If the value is present, the mapping function will be applied to the value, and an Optional containing the result is returned. Otherwise, returns an empty Optional.