com.google.common.collect
Class ForwardingDeque<E>
java.lang.Object
   com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingObject
       com.google.common.collect.ForwardingCollection<E>
com.google.common.collect.ForwardingCollection<E>
           com.google.common.collect.ForwardingQueue<E>
com.google.common.collect.ForwardingQueue<E>
               com.google.common.collect.ForwardingDeque<E>
com.google.common.collect.ForwardingDeque<E>
- All Implemented Interfaces: 
- Iterable<E>, Collection<E>, Deque<E>, Queue<E>
- @Beta
public abstract class ForwardingDeque<E> 
- 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, either providing your own implementation, or
 delegating to the provided standardOffer method.
 
The standard methods are not guaranteed to be thread-safe, even
 when all of the methods that they depend on are thread-safe.
- Since:
- 12.0
- Author:
- Kurt Alfred Kluever
| Constructor Summary | 
| protected  | ForwardingDeque()Constructor for use by subclasses.
 | 
 
 
 
| Methods inherited from class com.google.common.collect.ForwardingCollection | 
| add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray | 
 
 
 
 
 
ForwardingDeque
protected ForwardingDeque()
- Constructor for use by subclasses.
 
delegate
protected abstract Deque<E> delegate()
- Description copied from class: ForwardingObject
- Returns 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 as ForwardingSet.delegate(). Concrete subclasses override this method to supply
 the instance being decorated.
 
- 
- Specified by:
- delegatein class- ForwardingQueue<E>
 
- 
 
addFirst
public void addFirst(E e)
- 
- Specified by:
- addFirstin interface- Deque<E>
 
- 
 
addLast
public void addLast(E e)
- 
- Specified by:
- addLastin interface- Deque<E>
 
- 
 
descendingIterator
public Iterator<E> descendingIterator()
- 
- Specified by:
- descendingIteratorin interface- Deque<E>
 
- 
 
getFirst
public E getFirst()
- 
- Specified by:
- getFirstin interface- Deque<E>
 
- 
 
getLast
public E getLast()
- 
- Specified by:
- getLastin interface- Deque<E>
 
- 
 
offerFirst
public boolean offerFirst(E e)
- 
- Specified by:
- offerFirstin interface- Deque<E>
 
- 
 
offerLast
public boolean offerLast(E e)
- 
- Specified by:
- offerLastin interface- Deque<E>
 
- 
 
peekFirst
public E peekFirst()
- 
- Specified by:
- peekFirstin interface- Deque<E>
 
- 
 
peekLast
public E peekLast()
- 
- Specified by:
- peekLastin interface- Deque<E>
 
- 
 
pollFirst
public E pollFirst()
- 
- Specified by:
- pollFirstin interface- Deque<E>
 
- 
 
pollLast
public E pollLast()
- 
- Specified by:
- pollLastin interface- Deque<E>
 
- 
 
pop
public E pop()
- 
- Specified by:
- popin interface- Deque<E>
 
- 
 
push
public void push(E e)
- 
- Specified by:
- pushin interface- Deque<E>
 
- 
 
removeFirst
public E removeFirst()
- 
- Specified by:
- removeFirstin interface- Deque<E>
 
- 
 
removeLast
public E removeLast()
- 
- Specified by:
- removeLastin interface- Deque<E>
 
- 
 
removeFirstOccurrence
public boolean removeFirstOccurrence(Object o)
- 
- Specified by:
- removeFirstOccurrencein interface- Deque<E>
 
- 
 
removeLastOccurrence
public boolean removeLastOccurrence(Object o)
- 
- Specified by:
- removeLastOccurrencein interface- Deque<E>
 
- 
 
Copyright © 2010-2012. All Rights Reserved.