Class MultiValueMap<K,​V>

  • Type Parameters:
    K - key
    V - value
    All Implemented Interfaces:
    java.io.Serializable, java.util.concurrent.ConcurrentMap<K,​java.util.Set<V>>, java.util.Map<K,​java.util.Set<V>>, MultiMap<K,​V>

    public class MultiValueMap<K,​V>
    extends java.util.concurrent.ConcurrentHashMap<K,​java.util.Set<V>>
    implements MultiMap<K,​V>

    Copyright: Copyright (c) 2007

    Company: Clark & Parsia, LLC.

    Author:
    Evren Sirin
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap

        java.util.concurrent.ConcurrentHashMap.KeySetView<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(K key, V value)  
      boolean addAll​(K key, java.util.Collection<? extends V> collection)  
      boolean contains​(K key, V value)  
      boolean containsKey​(java.lang.Object key)  
      java.util.Iterator<V> flattenedValues()  
      java.util.Set<V> put​(K key, java.util.Set<V> values)  
      java.util.Set<V> putSingle​(K key, V value)  
      boolean remove​(java.lang.Object key, java.lang.Object value)  
      • Methods inherited from class java.util.concurrent.ConcurrentHashMap

        clear, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        clear, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, values
    • Constructor Detail

      • MultiValueMap

        public MultiValueMap()
      • MultiValueMap

        public MultiValueMap​(int initialCapacity)
    • Method Detail

      • putSingle

        public java.util.Set<V> putSingle​(K key,
                                          V value)
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
        Overrides:
        containsKey in class java.util.concurrent.ConcurrentHashMap<K,​java.util.Set<V>>
      • put

        public java.util.Set<V> put​(K key,
                                    java.util.Set<V> values)
        Specified by:
        put in interface java.util.Map<K,​V>
        Overrides:
        put in class java.util.concurrent.ConcurrentHashMap<K,​java.util.Set<V>>
      • add

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

        public boolean addAll​(K key,
                              java.util.Collection<? extends V> collection)
      • remove

        public boolean remove​(java.lang.Object key,
                              java.lang.Object value)
        Specified by:
        remove in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        remove in interface java.util.Map<K,​V>
        Overrides:
        remove in class java.util.concurrent.ConcurrentHashMap<K,​java.util.Set<V>>
      • contains

        public boolean contains​(K key,
                                V value)
      • flattenedValues

        public java.util.Iterator<V> flattenedValues()