or_else_throw


Description:

public T or_else_throw (SupplyFunc<Error> supplier) throws Error

Returns the value if present, otherwise throws an error.

Parameters:

supplier

The supplier function to invoke if the optional is empty.

Returns:

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