Class KeyedQueue<K,​V>


  • public final class KeyedQueue<K,​V>
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<K,​java.util.Queue<V>> _data  
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyedQueue()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(K key, V value)  
      void clear()  
      private java.util.Queue<V> getQueue​(K key)  
      boolean offer​(K key, V value)  
      V peek​(K key)  
      V poll​(K key)  
      int size​(K key)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _data

        private final java.util.Map<K,​java.util.Queue<V>> _data
    • Constructor Detail

      • KeyedQueue

        public KeyedQueue()
    • Method Detail

      • getQueue

        private java.util.Queue<V> getQueue​(K key)
      • add

        public boolean add​(K key,
                           V value)
      • offer

        public boolean offer​(K key,
                             V value)
      • poll

        public V poll​(K key)
      • peek

        public V peek​(K key)
      • size

        public int size​(K key)
      • clear

        public void clear()