Skip to content

Commit 3f6d016

Browse files
author
Stuart Marks
committed
8314896: additional clarifications to reversed() default methods' implementation requirements
Reviewed-by: bchristi
1 parent 2d46b29 commit 3f6d016

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/java.base/share/classes/java/util/Deque.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@ public interface Deque<E> extends Queue<E>, SequencedCollection<E> {
622622
* to this Deque. Other operations on the view are implemented via calls to
623623
* public methods on this Deque. The exact relationship between calls on the
624624
* view and calls on this Deque is unspecified. However, order-sensitive
625-
* operations generally delegate to the appropriate method with the opposite
626-
* orientation. For example, calling {@code getFirst} on the view results in
627-
* a call to {@code getLast} on this Deque.
625+
* operations generally behave as if they delegate to the appropriate method
626+
* with the opposite orientation. For example, calling {@code getFirst} on
627+
* the view might result in a call to {@code getLast} on this Deque.
628628
*
629629
* @return a reverse-ordered view of this collection, as a {@code Deque}
630630
* @since 21

src/java.base/share/classes/java/util/List.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,9 @@ default E removeLast() {
891891
* to this List. Other operations on the view are implemented via calls to
892892
* public methods on this List. The exact relationship between calls on the
893893
* view and calls on this List is unspecified. However, order-sensitive
894-
* operations generally delegate to the appropriate method with the opposite
895-
* orientation. For example, calling {@code getFirst} on the view results in
896-
* a call to {@code getLast} on this List.
894+
* operations generally behave as if they delegate to the appropriate method
895+
* with the opposite orientation. For example, calling {@code getFirst} on
896+
* the view might result in a call to {@code getLast} on this List.
897897
*
898898
* @return a reverse-ordered view of this collection, as a {@code List}
899899
* @since 21

src/java.base/share/classes/java/util/SortedMap.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@ default V putLast(K k, V v) {
321321
* to this SortedMap. Other operations on the view are implemented via calls to
322322
* public methods on this SortedMap. The exact relationship between calls on the
323323
* view and calls on this SortedMap is unspecified. However, order-sensitive
324-
* operations generally delegate to the appropriate method with the opposite
325-
* orientation. For example, calling {@code firstEntry} on the view results in
326-
* a call to {@code lastEntry} on this SortedMap.
324+
* operations generally behave as if they delegate to the appropriate method
325+
* with the opposite orientation. For example, calling {@code firstEntry} on
326+
* the view might result in a call to {@code lastEntry} on this SortedMap.
327327
*
328328
* @return a reverse-ordered view of this map, as a {@code SortedMap}
329329
* @since 21

src/java.base/share/classes/java/util/SortedSet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ default E removeLast() {
365365
* to this SortedSet. Other operations on the view are implemented via calls to
366366
* public methods on this SortedSet. The exact relationship between calls on the
367367
* view and calls on this SortedSet is unspecified. However, order-sensitive
368-
* operations generally delegate to the appropriate method with the opposite
369-
* orientation. For example, calling {@code getFirst} on the view results in
370-
* a call to {@code getLast} on this SortedSet.
368+
* operations generally behave as if they delegate to the appropriate method
369+
* with the opposite orientation. For example, calling {@code getFirst} on the
370+
* view might result in a call to {@code getLast} on this SortedSet.
371371
*
372372
* @return a reverse-ordered view of this collection, as a {@code SortedSet}
373373
* @since 21

0 commit comments

Comments
 (0)