Optional.or name <was> Re: RFR 8080418 Add Optional.or()
spliterator at gmail.com
Mon Oct 12 08:17:12 UTC 2015
> “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.
- "Optional.orIfAbsent" perhaps?
Actually, I don't regard "Optional.or" as a poor name.
More information about the core-libs-dev