or_else


Description:

public T or_else (T other)

Returns the value if present, otherwise the other.

Parameters:

other

The value to return if the optional is empty.

Returns:

Returns the value contained by the optional if present, otherwise returns other.