Package org.pgpainless.util

# Class MultiMap<K,V>

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

public class MultiMap<K,V> extends Object

## Constructor Summary

Constructors
Constructor
Description
`MultiMap()`
`MultiMap(Map<K,Set<V>> content)`
`MultiMap(MultiMap<K,V> other)`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
`boolean`
`containsKey(K o)`
`boolean`
`containsValue(V o)`
`Set<Map.Entry<K,Set<V>>>`
`entrySet()`
`boolean`
`equals(Object o)`
`Set<V>`
`flatten()`
Return all values of the `MultiMap` in a single `LinkedHashSet`.
`Set<V>`
`get(K o)`
`int`
`hashCode()`
`boolean`
`isEmpty()`
`Set<K>`
`keySet()`
`void`
`put(K k, Set<V> vs)`
`void`
`put(K k, V v)`
`void`
`putAll(MultiMap<K,V> other)`
`void`
`remove(K o, V v)`
`void`
`removeAll(K o)`
`int`
`size()`
`Collection<Set<V>>`
`values()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## 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`