public abstract class ForwardingDeque<E> extends ForwardingQueue<E> implements java.util.Deque<E>
Warning: The methods of ForwardingDeque forward indiscriminately to the
methods of the delegate. For example, overriding ForwardingCollection.add(E) alone will not change the
behavior of ForwardingQueue.offer(E) which can lead to unexpected behavior. In this case, you should
override offer as well.
default method warning: This class does not forward calls to default methods. Instead, it inherits their default implementations. When those implementations
invoke methods, they invoke methods on the ForwardingDeque.
| Modifier | Constructor and Description |
|---|---|
protected |
ForwardingDeque()
Constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFirst(E e) |
void |
addLast(E e) |
protected abstract java.util.Deque<E> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
java.util.Iterator<E> |
descendingIterator() |
E |
getFirst() |
E |
getLast() |
boolean |
offerFirst(E e) |
boolean |
offerLast(E e) |
E |
peekFirst() |
E |
peekLast() |
E |
pollFirst() |
E |
pollLast() |
E |
pop() |
void |
push(E e) |
E |
removeFirst() |
boolean |
removeFirstOccurrence(java.lang.Object o) |
E |
removeLast() |
boolean |
removeLastOccurrence(java.lang.Object o) |
element, offer, peek, poll, remove, standardOffer, standardPeek, standardPolladd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArraytoStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, element, iterator, offer, peek, poll, remove, remove, sizeprotected abstract java.util.Deque<E> delegate()
ForwardingObjectForwardingSet.delegate(). Concrete subclasses override this method to supply the
instance being decorated.delegate in class ForwardingQueue<E>public java.util.Iterator<E> descendingIterator()
descendingIterator in interface java.util.Deque<E>@CheckForNull public E peekFirst()
peekFirst in interface java.util.Deque<E>@CheckForNull public E pollFirst()
pollFirst in interface java.util.Deque<E>public boolean removeFirstOccurrence(@CheckForNull
java.lang.Object o)
removeFirstOccurrence in interface java.util.Deque<E>public boolean removeLastOccurrence(@CheckForNull
java.lang.Object o)
removeLastOccurrence in interface java.util.Deque<E>