mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8308694: Clarify reversed() default methods' implementation requirements
Reviewed-by: rriggs
This commit is contained in:
parent
7304316a8c
commit
f82c8184b2
4 changed files with 32 additions and 8 deletions
|
@ -617,8 +617,14 @@ public interface Deque<E> extends Queue<E>, SequencedCollection<E> {
|
|||
* {@inheritDoc}
|
||||
*
|
||||
* @implSpec
|
||||
* The implementation in this interface returns an instance of a reverse-ordered
|
||||
* Deque that delegates its operations to this Deque.
|
||||
* The implementation in this interface returns a reverse-ordered Deque
|
||||
* view. The {@code reversed()} method of the view returns a reference
|
||||
* 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.
|
||||
*
|
||||
* @return a reverse-ordered view of this collection, as a {@code Deque}
|
||||
* @since 21
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue