Class MultiMap<K,V>

java.lang.Object
org.pgpainless.util.MultiMap<K,V>

public class MultiMap<K,V> extends Object
  • Constructor Details

    • MultiMap

      public MultiMap()
    • MultiMap

      public MultiMap(@Nonnull MultiMap<K,V> other)
    • MultiMap

      public MultiMap(@Nonnull Map<K,Set<V>> content)
  • Method Details

    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • containsKey

      public boolean containsKey(K o)
    • containsValue

      public boolean containsValue(V o)
    • get

      public Set<V> get(K o)
    • put

      public void put(K k, V v)
    • put

      public void put(K k, Set<V> vs)
    • removeAll

      public void removeAll(K o)
    • remove

      public void remove(K o, V v)
    • putAll

      public void putAll(MultiMap<K,V> other)
    • clear

      public void clear()
    • keySet

      public Set<K> keySet()
    • values

      public Collection<Set<V>> values()
    • entrySet

      public Set<Map.Entry<K,Set<V>>> entrySet()
    • flatten

      public Set<V> flatten()
      Return all values of the MultiMap in a single LinkedHashSet.
      Returns:
      set of all values
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object