Class ForwardingQueue<E>

java.lang.Object
org.jmxtrans.agent.util.collect.ForwardingCollection<E>
org.jmxtrans.agent.util.collect.ForwardingQueue<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, java.util.Queue<E>
Direct Known Subclasses:
EvictingQueue

public abstract class ForwardingQueue<E>
extends ForwardingCollection<E>
implements java.util.Queue<E>
Author:
Cyrille Le Clerc
  • Constructor Summary

    Constructors
    Constructor Description
    ForwardingQueue()  
  • Method Summary

    Modifier and Type Method Description
    boolean add​(E e)  
    protected abstract java.util.Queue<E> delegate()  
    E element()  
    boolean offer​(E e)  
    E peek()  
    E poll()  
    E remove()  

    Methods inherited from class org.jmxtrans.agent.util.collect.ForwardingCollection

    addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, toArray, toArray, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray

    Methods inherited from interface java.lang.Iterable

    forEach
  • Constructor Details

    • ForwardingQueue

      public ForwardingQueue()
  • Method Details

    • delegate

      @Nonnull protected abstract java.util.Queue<E> delegate()
      Specified by:
      delegate in class ForwardingCollection<E>
    • add

      public boolean add​(E e)
      Specified by:
      add in interface java.util.Collection<E>
      Specified by:
      add in interface java.util.Queue<E>
      Overrides:
      add in class ForwardingCollection<E>
    • offer

      public boolean offer​(E e)
      Specified by:
      offer in interface java.util.Queue<E>
    • remove

      public E remove()
      Specified by:
      remove in interface java.util.Queue<E>
    • poll

      public E poll()
      Specified by:
      poll in interface java.util.Queue<E>
    • element

      public E element()
      Specified by:
      element in interface java.util.Queue<E>
    • peek

      public E peek()
      Specified by:
      peek in interface java.util.Queue<E>