>
> “Optional.or” is the best name so far i have come up with. The “orElse” 
> prefix is reversed for terminal methods and i don’t want to overload that.
>
> --
>
> Alternative suggestions:
>
> - “Optional.otherwise”
> A bit of a mouthful, but reasonably accurate
>
> - “Optional.mapElse"
> The name is not entirely accurate since it accepts a Suppler<T> not a T, a 
> more accurate name would be the following alternative.
>
> - “Optional.flatMapElse"
> This name is likely to confuse.
>
> Paul.
>



- "Optional.orIfAbsent" perhaps?

Actually, I don't regard "Optional.or" as a poor name.


Stefan.

Reply via email to