public abstract class ForwardingDeque<E> extends ForwardingQueue<E> implements Deque <E>
Warning: The methods of ForwardingDeque forward indiscriminately to the methods of the delegate. For example, overriding ForwardingCollection alone will not change the behavior of ForwardingQueue which can lead to unexpected behavior. In this case, you should override offer as well.
| 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 Deque |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
Iterator |
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(Object
|
E |
removeLast()
|
boolean |
removeLastOccurrence(Object
|
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, sizeaddAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayprotected abstract Deque<E> delegate()
ForwardingObject
ForwardingSet.delegate() . Concrete subclasses override this method to supply the instance being decorated.
public void addFirst(E e)
public void addLast(E e)
public E getFirst()
public E getLast()
public boolean offerFirst(E e)
public boolean offerLast(E e)
public E peekFirst()
public E peekLast()
public E pollFirst()
public E pollLast()
public E pop()
public void push(E e)
public E removeFirst()
public E removeLast()
public boolean removeFirstOccurrence(Objecto)
public boolean removeLastOccurrence(Objecto)