--- jsr166/src/main/java/util/Deque.java 2015/09/29 02:01:55 1.32 +++ jsr166/src/main/java/util/Deque.java 2017/05/06 06:55:50 1.37 @@ -31,36 +31,36 @@ package java.util; * Summary of Deque methods * * - * First Element (Head) - * Last Element (Tail) + * First Element (Head) + * Last Element (Tail) * * * - * Throws exception - * Special value - * Throws exception - * Special value + * Throws exception + * Special value + * Throws exception + * Special value * * * Insert - * {@link Deque#addFirst addFirst(e)} - * {@link Deque#offerFirst offerFirst(e)} - * {@link Deque#addLast addLast(e)} - * {@link Deque#offerLast offerLast(e)} + * {@link #addFirst(Object) addFirst(e)} + * {@link #offerFirst(Object) offerFirst(e)} + * {@link #addLast(Object) addLast(e)} + * {@link #offerLast(Object) offerLast(e)} * * * Remove - * {@link Deque#removeFirst removeFirst()} - * {@link Deque#pollFirst pollFirst()} - * {@link Deque#removeLast removeLast()} - * {@link Deque#pollLast pollLast()} + * {@link #removeFirst() removeFirst()} + * {@link #pollFirst() pollFirst()} + * {@link #removeLast() removeLast()} + * {@link #pollLast() pollLast()} * * * Examine - * {@link Deque#getFirst getFirst()} - * {@link Deque#peekFirst peekFirst()} - * {@link Deque#getLast getLast()} - * {@link Deque#peekLast peekLast()} + * {@link #getFirst() getFirst()} + * {@link #peekFirst() peekFirst()} + * {@link #getLast() getLast()} + * {@link #peekLast() peekLast()} * * * @@ -73,32 +73,32 @@ package java.util; * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * *
Comparison of Queue and Deque methods
{@code Queue} Method Equivalent {@code Deque} Method {@code Queue} Method Equivalent {@code Deque} Method
{@link java.util.Queue#add add(e)}{@link #addLast addLast(e)}{@link #add(Object) add(e)}{@link #addLast(Object) addLast(e)}
{@link java.util.Queue#offer offer(e)}{@link #offerLast offerLast(e)}{@link #offer(Object) offer(e)}{@link #offerLast(Object) offerLast(e)}
{@link java.util.Queue#remove remove()}{@link #removeFirst removeFirst()}{@link #remove() remove()}{@link #removeFirst() removeFirst()}
{@link java.util.Queue#poll poll()}{@link #pollFirst pollFirst()}{@link #poll() poll()}{@link #pollFirst() pollFirst()}
{@link java.util.Queue#element element()}{@link #getFirst getFirst()}{@link #element() element()}{@link #getFirst() getFirst()}
{@link java.util.Queue#peek peek()}{@link #peek peekFirst()}{@link #peek() peek()}{@link #peekFirst() peekFirst()}
* @@ -111,20 +111,20 @@ package java.util; * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * * - * - * + * + * * *
Comparison of Stack and Deque methods
Stack Method Equivalent {@code Deque} Method Stack Method Equivalent {@code Deque} Method
{@link #push push(e)}{@link #addFirst addFirst(e)}{@link #push(Object) push(e)}{@link #addFirst(Object) addFirst(e)}
{@link #pop pop()}{@link #removeFirst removeFirst()}{@link #pop() pop()}{@link #removeFirst() removeFirst()}
{@link #peek peek()}{@link #peekFirst peekFirst()}{@link #peek() peek()}{@link #peekFirst() peekFirst()}
* @@ -145,16 +145,16 @@ package java.util; * that do allow null elements are strongly encouraged not to * take advantage of the ability to insert nulls. This is so because * {@code null} is used as a special return value by various methods - * to indicated that the deque is empty. + * to indicate that the deque is empty. * *

{@code Deque} implementations generally do not define * element-based versions of the {@code equals} and {@code hashCode} * methods, but instead inherit the identity-based versions from class * {@code Object}. * - *

This interface is a member of the Java Collections - * Framework. + *

This interface is a member of the + * + * Java Collections Framework. * * @author Doug Lea * @author Josh Bloch @@ -323,10 +323,10 @@ public interface Deque extends Queue< * @return {@code true} if an element was removed as a result of this call * @throws ClassCastException if the class of the specified element * is incompatible with this deque - * (optional) + * (optional) * @throws NullPointerException if the specified element is null and this * deque does not permit null elements - * (optional) + * (optional) */ boolean removeFirstOccurrence(Object o); @@ -342,10 +342,10 @@ public interface Deque extends Queue< * @return {@code true} if an element was removed as a result of this call * @throws ClassCastException if the class of the specified element * is incompatible with this deque - * (optional) + * (optional) * @throws NullPointerException if the specified element is null and this * deque does not permit null elements - * (optional) + * (optional) */ boolean removeLastOccurrence(Object o); @@ -401,8 +401,8 @@ public interface Deque extends Queue< /** * Retrieves and removes the head of the queue represented by this deque * (in other words, the first element of this deque). - * This method differs from {@link #poll poll} only in that it throws an - * exception if this deque is empty. + * This method differs from {@link #poll() poll()} only in that it + * throws an exception if this deque is empty. * *

This method is equivalent to {@link #removeFirst()}. * @@ -500,10 +500,10 @@ public interface Deque extends Queue< * @return {@code true} if an element was removed as a result of this call * @throws ClassCastException if the class of the specified element * is incompatible with this deque - * (optional) + * (optional) * @throws NullPointerException if the specified element is null and this * deque does not permit null elements - * (optional) + * (optional) */ boolean remove(Object o); @@ -516,10 +516,10 @@ public interface Deque extends Queue< * @return {@code true} if this deque contains the specified element * @throws ClassCastException if the class of the specified element * is incompatible with this deque - * (optional) + * (optional) * @throws NullPointerException if the specified element is null and this * deque does not permit null elements - * (optional) + * (optional) */ boolean contains(Object o);