Class ForwardingDeque<E>

  • All Implemented Interfaces:
    Iterable<E>, Collection<E>, Deque<E>, Queue<E>
    Direct Known Subclasses:

    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.