On 12 October 2015 at 08:48, Paul Sandoz <paul.san...@oracle.com> wrote:
> Now that the overall documentation changes and functional behaviour of 
> Optional.or has been agreed i would like to see if we can find a better name, 
> suggestions welcome, so lets get our paint brushes out :-)

"or" seems reasonable for this method.

"If a value is present, returns an {@code Optional} describing the
value, otherwise returns an {@code Optional} produced by the supplying
function."

I'd prefer to see "this" mentioned:

"If a value is not present, invoke the specified supplier to provide
the result, otherwise return {@code this}"

While I understand the original form gave some spec wiggle room, it
also made the method far more mysterious.

Stephen

Reply via email to