or_else_get


Description:

public T or_else_get (SupplyFunc<T> supplier)

Returns the value if present, otherwise the value supplied by the supplier function.

Parameters:

supplier

The supplier function to invoke if the optional is empty.

Returns:

Returns the value contained by the optional if present, otherwise returns the value provided by the supplier function.