RFR: 8015317: Optional.filter, map, and flatMap
Paul Sandoz
paul.sandoz at oracle.com
Mon Jul 8 01:29:32 PDT 2013
On Jul 5, 2013, at 11:37 PM, Henry Jen <henry.jen at oracle.com> wrote:
> Hi,
>
> Please review the webrev at
>
> http://cr.openjdk.java.net/~henryjen/ccc/8015317.0/webrev/
>
Looks OK to me.
Paul.
> Which adds following method to Optional,
>
> public static <T> Optional<T> ofNullable(T value) {}
> public Optional<T> filter(Predicate<? super T> predicate) {}
> public<U> Optional<U> map(Function<? super T, ? extends U> mapper) {}
> public<U> Optional<U> flatMap(Function<? super T, ? extends Optional<U>>
> mapper) {}
>
> Also included is some cleanup on javadoc.
>
> Cheers,
> Henry
>
More information about the lambda-dev
mailing list