--- old/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java 2017-08-18 15:03:13.618921256 -0700 +++ new/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java 2017-08-18 15:03:13.398911633 -0700 @@ -56,66 +56,66 @@ * * * - * + * * * * - * - * - * - * + * + * + * + * * * - * - * - * - * - * + * + * + * + * + * * * - * - * - * - * - * + * + * + * + * + * * * - * - * - * - * - * + * + * + * + * + * * * - * + * * * * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * *
Summary of BlockingDeque methods
First Element (Head) First Element (Head)
Throws exceptionSpecial valueBlocksTimes outThrows exceptionSpecial valueBlocksTimes out
Insert{@link #addFirst(Object) addFirst(e)}{@link #offerFirst(Object) offerFirst(e)}{@link #putFirst(Object) putFirst(e)}{@link #offerFirst(Object, long, TimeUnit) offerFirst(e, time, unit)}Insert{@link #addFirst(Object) addFirst(e)}{@link #offerFirst(Object) offerFirst(e)}{@link #putFirst(Object) putFirst(e)}{@link #offerFirst(Object, long, TimeUnit) offerFirst(e, time, unit)}
Remove{@link #removeFirst() removeFirst()}{@link #pollFirst() pollFirst()}{@link #takeFirst() takeFirst()}{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}Remove{@link #removeFirst() removeFirst()}{@link #pollFirst() pollFirst()}{@link #takeFirst() takeFirst()}{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}
Examine{@link #getFirst() getFirst()}{@link #peekFirst() peekFirst()}not applicablenot applicableExamine{@link #getFirst() getFirst()}{@link #peekFirst() peekFirst()}not applicablenot applicable
Last Element (Tail) Last Element (Tail)
Throws exceptionSpecial valueBlocksTimes out
Insert{@link #addLast(Object) addLast(e)}{@link #offerLast(Object) offerLast(e)}{@link #putLast(Object) putLast(e)}{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}
Remove{@link #removeLast() removeLast()}{@link #pollLast() pollLast()}{@link #takeLast() takeLast()}{@link #pollLast(long, TimeUnit) pollLast(time, unit)}
Examine{@link #getLast() getLast()}{@link #peekLast() peekLast()}not applicablenot applicableThrows exceptionSpecial valueBlocksTimes out
Insert{@link #addLast(Object) addLast(e)}{@link #offerLast(Object) offerLast(e)}{@link #putLast(Object) putLast(e)}{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}
Remove{@link #removeLast() removeLast()}{@link #pollLast() pollLast()}{@link #takeLast() takeLast()}{@link #pollLast(long, TimeUnit) pollLast(time, unit)}
Examine{@link #getLast() getLast()}{@link #peekLast() peekLast()}not applicablenot applicable
* @@ -131,57 +131,52 @@ * * * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * * * - * - * + * + * + * * * - * - * + * + * * * - * + * + * * * - * - * + * + * * * - * - * + * + * + * * * - * - * + * + * * * - * - * + * + * * * - * + * + * * * - * - * + * + * + * * * - * - * + * + * * *
Comparison of BlockingQueue and BlockingDeque methods
{@code BlockingQueue} Method Equivalent {@code BlockingDeque} Method
Insert
{@link #add(Object) add(e)}{@link #addLast(Object) addLast(e)}
{@link #offer(Object) offer(e)}{@link #offerLast(Object) offerLast(e)} {@code BlockingQueue} Method Equivalent {@code BlockingDeque} Method
{@link #put(Object) put(e)}{@link #putLast(Object) putLast(e)}Insert{@link #add(Object) add(e)}{@link #addLast(Object) addLast(e)}
{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}{@link #offer(Object) offer(e)}{@link #offerLast(Object) offerLast(e)}
Remove{@link #put(Object) put(e)}{@link #putLast(Object) putLast(e)}
{@link #remove() remove()}{@link #removeFirst() removeFirst()}{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}
{@link #poll() poll()}{@link #pollFirst() pollFirst()}Remove{@link #remove() remove()}{@link #removeFirst() removeFirst()}
{@link #take() take()}{@link #takeFirst() takeFirst()}{@link #poll() poll()}{@link #pollFirst() pollFirst()}
{@link #poll(long, TimeUnit) poll(time, unit)}{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}{@link #take() take()}{@link #takeFirst() takeFirst()}
Examine{@link #poll(long, TimeUnit) poll(time, unit)}{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}
{@link #element() element()}{@link #getFirst() getFirst()}Examine{@link #element() element()}{@link #getFirst() getFirst()}
{@link #peek() peek()}{@link #peekFirst() peekFirst()}{@link #peek() peek()}{@link #peekFirst() peekFirst()}
*