If a value is present, returns the value, otherwise returns the result produced by the supplying function.
supplier | the supplying function that produces a value to be returned |
NullPointerException | if no value is present and the supplying
function is null |
Diagram: Optional