From 3f6d01687c06211f49ce6b238d8a7aa6876262cd Mon Sep 17 00:00:00 2001 From: Stuart Marks Date: Wed, 11 Oct 2023 16:42:28 +0000 Subject: [PATCH] 8314896: additional clarifications to reversed() default methods' implementation requirements Reviewed-by: bchristi --- src/java.base/share/classes/java/util/Deque.java | 6 +++--- src/java.base/share/classes/java/util/List.java | 6 +++--- src/java.base/share/classes/java/util/SortedMap.java | 6 +++--- src/java.base/share/classes/java/util/SortedSet.java | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/java.base/share/classes/java/util/Deque.java b/src/java.base/share/classes/java/util/Deque.java index fd42bc356de..ce406879894 100644 --- a/src/java.base/share/classes/java/util/Deque.java +++ b/src/java.base/share/classes/java/util/Deque.java @@ -622,9 +622,9 @@ public interface Deque extends Queue, SequencedCollection { * to this Deque. Other operations on the view are implemented via calls to * public methods on this Deque. The exact relationship between calls on the * view and calls on this Deque is unspecified. However, order-sensitive - * operations generally delegate to the appropriate method with the opposite - * orientation. For example, calling {@code getFirst} on the view results in - * a call to {@code getLast} on this Deque. + * operations generally behave as if they delegate to the appropriate method + * with the opposite orientation. For example, calling {@code getFirst} on + * the view might result in a call to {@code getLast} on this Deque. * * @return a reverse-ordered view of this collection, as a {@code Deque} * @since 21 diff --git a/src/java.base/share/classes/java/util/List.java b/src/java.base/share/classes/java/util/List.java index d5565fa7a97..86cf4267312 100644 --- a/src/java.base/share/classes/java/util/List.java +++ b/src/java.base/share/classes/java/util/List.java @@ -891,9 +891,9 @@ public interface List extends SequencedCollection { * to this List. Other operations on the view are implemented via calls to * public methods on this List. The exact relationship between calls on the * view and calls on this List is unspecified. However, order-sensitive - * operations generally delegate to the appropriate method with the opposite - * orientation. For example, calling {@code getFirst} on the view results in - * a call to {@code getLast} on this List. + * operations generally behave as if they delegate to the appropriate method + * with the opposite orientation. For example, calling {@code getFirst} on + * the view might result in a call to {@code getLast} on this List. * * @return a reverse-ordered view of this collection, as a {@code List} * @since 21 diff --git a/src/java.base/share/classes/java/util/SortedMap.java b/src/java.base/share/classes/java/util/SortedMap.java index 447b0a2c7e7..294a526e313 100644 --- a/src/java.base/share/classes/java/util/SortedMap.java +++ b/src/java.base/share/classes/java/util/SortedMap.java @@ -321,9 +321,9 @@ public interface SortedMap extends SequencedMap { * to this SortedMap. Other operations on the view are implemented via calls to * public methods on this SortedMap. The exact relationship between calls on the * view and calls on this SortedMap is unspecified. However, order-sensitive - * operations generally delegate to the appropriate method with the opposite - * orientation. For example, calling {@code firstEntry} on the view results in - * a call to {@code lastEntry} on this SortedMap. + * operations generally behave as if they delegate to the appropriate method + * with the opposite orientation. For example, calling {@code firstEntry} on + * the view might result in a call to {@code lastEntry} on this SortedMap. * * @return a reverse-ordered view of this map, as a {@code SortedMap} * @since 21 diff --git a/src/java.base/share/classes/java/util/SortedSet.java b/src/java.base/share/classes/java/util/SortedSet.java index 3b4612457c6..2648fda40a2 100644 --- a/src/java.base/share/classes/java/util/SortedSet.java +++ b/src/java.base/share/classes/java/util/SortedSet.java @@ -365,9 +365,9 @@ public interface SortedSet extends Set, SequencedSet { * to this SortedSet. Other operations on the view are implemented via calls to * public methods on this SortedSet. The exact relationship between calls on the * view and calls on this SortedSet is unspecified. However, order-sensitive - * operations generally delegate to the appropriate method with the opposite - * orientation. For example, calling {@code getFirst} on the view results in - * a call to {@code getLast} on this SortedSet. + * operations generally behave as if they delegate to the appropriate method + * with the opposite orientation. For example, calling {@code getFirst} on the + * view might result in a call to {@code getLast} on this SortedSet. * * @return a reverse-ordered view of this collection, as a {@code SortedSet} * @since 21