Re: RFR 8071600: Add a flat-mapping collector

2015-02-25 Thread Paul Sandoz
On Feb 12, 2015, at 5:07 PM, Paul Sandoz wrote: > On Feb 12, 2015, at 4:51 PM, Peter Levart wrote: >> Hi Paul, >> >> Would the following "optimization" make any sense? >> >>public static >>Collector flatMapping(Function> extends U>> mapper, >> Collec

Re: RFR 8071600: Add a flat-mapping collector

2015-02-12 Thread Peter Levart
On 02/12/2015 05:07 PM, Paul Sandoz wrote: On Feb 12, 2015, at 4:51 PM, Peter Levart wrote: Hi Paul, Would the following "optimization" make any sense? public static Collector flatMapping(Function> mapper, Collector downstream) { BiCons

Re: RFR 8071600: Add a flat-mapping collector

2015-02-12 Thread Paul Sandoz
On Feb 12, 2015, at 4:51 PM, Peter Levart wrote: > Hi Paul, > > Would the following "optimization" make any sense? > > public static > Collector flatMapping(Function extends U>> mapper, >Collector downstream) { > BiConsumer downstreamAccumulat

Re: RFR 8071600: Add a flat-mapping collector

2015-02-12 Thread Peter Levart
On 02/12/2015 04:51 PM, Peter Levart wrote: On 02/03/2015 02:48 PM, Paul Sandoz wrote: Hi, http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ This patch adds a new flat mapping collector to Collectors. This can be useful if one needs to map 0 or more items in

Re: RFR 8071600: Add a flat-mapping collector

2015-02-12 Thread Peter Levart
On 02/03/2015 02:48 PM, Paul Sandoz wrote: Hi, http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ This patch adds a new flat mapping collector to Collectors. This can be useful if one needs to map 0 or more items into a downstream collector. A CCC will be file

Re: RFR 8071600: Add a flat-mapping collector

2015-02-12 Thread Paul Sandoz
On Feb 12, 2015, at 3:33 PM, Chris Hegarty wrote: > On 3 Feb 2015, at 13:48, Paul Sandoz wrote: > >> Hi, >> >> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ > > Looks like a useful addition. > Thanks. > Trivially, the handling of null caught my eye: "

Re: RFR 8071600: Add a flat-mapping collector

2015-02-12 Thread Chris Hegarty
On 3 Feb 2015, at 13:48, Paul Sandoz wrote: > Hi, > > http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ Looks like a useful addition. Trivially, the handling of null caught my eye: "If a mapped stream is {@code null} an empty stream is used, instead.” It look

Re: RFR 8071600: Add a flat-mapping collector

2015-02-11 Thread Stuart Marks
On 2/11/15 1:54 AM, Paul Sandoz wrote: On Feb 11, 2015, at 12:02 AM, Stuart Marks wrote: Hi Paul, On 2/3/15 5:48 AM, Paul Sandoz wrote: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ This patch adds a new flat mapping collector to Collectors. This can

Re: RFR 8071600: Add a flat-mapping collector

2015-02-11 Thread Paul Sandoz
On Feb 11, 2015, at 12:02 AM, Stuart Marks wrote: > Hi Paul, > > On 2/3/15 5:48 AM, Paul Sandoz wrote: >> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ >> >> This patch adds a new flat mapping collector to Collectors. This can be >> useful if one needs to

Re: RFR 8071600: Add a flat-mapping collector

2015-02-10 Thread Stuart Marks
Hi Paul, On 2/3/15 5:48 AM, Paul Sandoz wrote: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ This patch adds a new flat mapping collector to Collectors. This can be useful if one needs to map 0 or more items into a downstream collector. Mostly pretty good

RFR 8071600: Add a flat-mapping collector

2015-02-03 Thread Paul Sandoz
Hi, http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8071600-Collector-flatMapping/webrev/ This patch adds a new flat mapping collector to Collectors. This can be useful if one needs to map 0 or more items into a downstream collector. A CCC will be filed. A following patch, which i plan to fold in