mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8267939: Clarify the specification of iterator and spliterator forEachRemaining
Reviewed-by: smarks
This commit is contained in:
parent
460ce5553c
commit
c1f3094f81
2 changed files with 27 additions and 28 deletions
|
@ -300,6 +300,9 @@ public interface Spliterator<T> {
|
|||
* Spliterator is {@link #ORDERED} the action is performed on the
|
||||
* next element in encounter order. Exceptions thrown by the
|
||||
* action are relayed to the caller.
|
||||
* <p>
|
||||
* Subsequent behavior of a spliterator is unspecified if the action throws
|
||||
* an exception.
|
||||
*
|
||||
* @param action The action
|
||||
* @return {@code false} if no remaining elements existed
|
||||
|
@ -314,6 +317,9 @@ public interface Spliterator<T> {
|
|||
* throws an exception. If this Spliterator is {@link #ORDERED}, actions
|
||||
* are performed in encounter order. Exceptions thrown by the action
|
||||
* are relayed to the caller.
|
||||
* <p>
|
||||
* Subsequent behavior of a spliterator is unspecified if the action throws
|
||||
* an exception.
|
||||
*
|
||||
* @implSpec
|
||||
* The default implementation repeatedly invokes {@link #tryAdvance} until
|
||||
|
@ -613,6 +619,9 @@ public interface Spliterator<T> {
|
|||
* Spliterator is {@link #ORDERED} the action is performed on the
|
||||
* next element in encounter order. Exceptions thrown by the
|
||||
* action are relayed to the caller.
|
||||
* <p>
|
||||
* Subsequent behavior of a spliterator is unspecified if the action throws
|
||||
* an exception.
|
||||
*
|
||||
* @param action The action
|
||||
* @return {@code false} if no remaining elements existed
|
||||
|
@ -628,6 +637,9 @@ public interface Spliterator<T> {
|
|||
* action throws an exception. If this Spliterator is {@link #ORDERED},
|
||||
* actions are performed in encounter order. Exceptions thrown by the
|
||||
* action are relayed to the caller.
|
||||
* <p>
|
||||
* Subsequent behavior of a spliterator is unspecified if the action throws
|
||||
* an exception.
|
||||
*
|
||||
* @implSpec
|
||||
* The default implementation repeatedly invokes {@link #tryAdvance}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue