java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingCollection<E>
com.google.common.collect.ForwardingQueue<E>
com.google.common.collect.ForwardingDeque<E>
- All Implemented Interfaces:
- Iterable<E>,- Collection<E>,- Deque<E>,- Queue<E>,- SequencedCollection<E>
- Direct Known Subclasses:
- ForwardingBlockingDeque,- ForwardingBlockingDeque
@GwtIncompatible
public abstract class ForwardingDeque<E extends @Nullable Object>
extends ForwardingQueue<E>
implements Deque<E>
A deque which forwards all its method calls to another deque. Subclasses should override one or
 more methods to modify the behavior of the backing deque as desired per the decorator pattern.
 
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.
- Since:
- 12.0
- Author:
- Kurt Alfred Kluever
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class com.google.common.collect.ForwardingQueueelement, offer, peek, poll, remove, standardOffer, standardPeek, standardPollMethods inherited from class com.google.common.collect.ForwardingCollectionadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArrayMethods inherited from class com.google.common.collect.ForwardingObjecttoStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collectionclear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
- 
Constructor Details- 
ForwardingDequeprotected ForwardingDeque()Constructor for use by subclasses.
 
- 
- 
Method Details- 
delegateDescription copied from class:ForwardingObjectReturns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such asForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.- Specified by:
- delegatein class- ForwardingQueue<E extends @Nullable Object>
 
- 
addFirst
- 
addLast
- 
descendingIterator
- 
getFirst
- 
getLast
- 
offerFirst- Specified by:
- offerFirstin interface- Deque<E extends @Nullable Object>
 
- 
offerLast
- 
peekFirst
- 
peekLast
- 
pollFirst
- 
pollLast
- 
pop
- 
push
- 
removeFirst- Specified by:
- removeFirstin interface- Deque<E extends @Nullable Object>
- Specified by:
- removeFirstin interface- SequencedCollection<E extends @Nullable Object>
 
- 
removeLast- Specified by:
- removeLastin interface- Deque<E extends @Nullable Object>
- Specified by:
- removeLastin interface- SequencedCollection<E extends @Nullable Object>
 
- 
removeFirstOccurrence- Specified by:
- removeFirstOccurrencein interface- Deque<E extends @Nullable Object>
 
- 
removeLastOccurrence- Specified by:
- removeLastOccurrencein interface- Deque<E extends @Nullable Object>
 
 
-