From ad959161e49bc0f1db549106d451e96b4eaccaac Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Wed, 9 Oct 2013 15:19:56 +0200 Subject: [PATCH] 8020061: Clarify reporting characteristics between splits Reviewed-by: alanb, chegar --- jdk/src/share/classes/java/util/Spliterator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/util/Spliterator.java b/jdk/src/share/classes/java/util/Spliterator.java index 08d8f1522ca..b78bad65935 100644 --- a/jdk/src/share/classes/java/util/Spliterator.java +++ b/jdk/src/share/classes/java/util/Spliterator.java @@ -414,13 +414,19 @@ public interface Spliterator { * #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED}, * {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT}, * {@link #SUBSIZED}. Repeated calls to {@code characteristics()} on - * a given spliterator should always return the same result. + * a given spliterator, prior to or in-between calls to {@code trySplit}, + * should always return the same result. * *

If a Spliterator reports an inconsistent set of * characteristics (either those returned from a single invocation * or across multiple invocations), no guarantees can be made * about any computation using this Spliterator. * + * @apiNote The characteristics of a given spliterator before splitting + * may differ from the characteristics after splitting. For specific + * examples see the characteristic values {@link #SIZED}, {@link #SUBSIZED} + * and {@link #CONCURRENT}. + * * @return a representation of characteristics */ int characteristics();