RFR: 8017231: Add StringJoiner.merge

Paul Sandoz paul.sandoz at oracle.com
Wed Jul 3 09:31:59 UTC 2013


On Jul 3, 2013, at 10:03 AM, Henry Jen <henry.jen at oracle.com> wrote:

> Hi,
> 
> Please review a simple addition of StringJoiner.merge method. This is
> useful to combine StringJoiners used in parallel doing joining works.
> 
> The webrev can be found at
> http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
> 

In StringJoiner:

For:

+     * <p>A {@code StringJoiner} is empty if {@link add(CharSequence) add()}
+     * has never been called, and if {@code merge()} has never been called
+     * with a non- empty {@code StringJoiner} argument.

Suggest:

* <p>A {@code StringJoiner} is empty if neither {@link add(CharSequence) add()}
* or {@code merge()} have been called with a non-empty {@code StringJoiner} 
* argument.


Missing a "then" after the ",":

+     * <p>If the other {@code StringJoiner} is using a different delimiter,
+     * elements from the other {@code StringJoiner} are concatenated with that


Otherwise looks good.

Paul.


More information about the core-libs-dev mailing list