Class MultiValueMap<K,​V>

  • Type Parameters:
    K - key 泛型
    V - value 泛型
    All Implemented Interfaces:
    Map<K,​Set<V>>

    public class MultiValueMap<K,​V>
    extends Object
    implements Map<K,​Set<V>>
    多值得 map
    Author:
    L.cm
    • Constructor Detail

      • MultiValueMap

        public MultiValueMap()
      • MultiValueMap

        public MultiValueMap​(Map<K,​Set<V>> targetMap)
    • Method Detail

      • add

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

        public void addAll​(K key,
                           Set<? extends V> values)
      • set

        public void set​(K key,
                        V value)
      • setAll

        public void setAll​(Map<K,​V> values)
      • size

        public int size()
        Specified by:
        size in interface Map<K,​V>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Map<K,​V>
      • put

        public Set<V> put​(K k,
                          Set<V> vs)
        Specified by:
        put in interface Map<K,​V>
      • putAll

        public void putAll​(Map<? extends K,​? extends Set<V>> map)
        Specified by:
        putAll in interface Map<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface Map<K,​V>
      • keySet

        public Set<K> keySet()
        Specified by:
        keySet in interface Map<K,​V>