public interface MultiMapState<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the map.
|
boolean |
containsEntry(K key,
V value)
Returns a boolean indicating whether the map contains an entry.
|
boolean |
containsKey(K key)
Returns a boolean indicating whether the map contains a key.
|
boolean |
containsValue(V value)
Returns a boolean indicating whether the map contains a value.
|
Set<Map.Entry<K,V>> |
entrySet()
Returns a set of entries in the map.
|
Collection<V> |
get(K key)
Gets a value from the map.
|
Collection<V> |
getOrDefault(K key,
Collection<V> defaultValue)
Gets a key from the map or returns a default value.
|
void |
init(StateContext<MultiMapState<K,V>> context)
Initializes the multimap state.
|
boolean |
isEmpty()
Returns a boolean indicating whether the map is empty.
|
Set<K> |
keySet()
Returns a set of keys in the map.
|
Collection<V> |
put(K key,
V value)
Puts a value in the map.
|
void |
putAll(Map<? extends K,? extends Collection<V>> m)
Puts a collection of values in the map.
|
Collection<V> |
remove(K key)
Removes a key from the map.
|
boolean |
remove(K key,
V value)
Removes an entry from the map.
|
Collection<V> |
replace(K key,
Collection<V> value)
Replaces a key in the map.
|
boolean |
replace(K key,
V oldValue,
V newValue)
Replaces a value in the map.
|
void |
replaceAll(java.util.function.BiFunction<? super K,? super Collection<V>,? extends Collection<V>> function)
Replaces a set of keys in the map.
|
int |
size()
Returns the map size.
|
Collection<V> |
values()
Returns a set of values in the map.
|
void init(StateContext<MultiMapState<K,V>> context)
context - The multimap state context.int size()
boolean isEmpty()
boolean containsKey(K key)
boolean containsValue(V value)
boolean containsEntry(K key, V value)
Collection<V> get(K key)
Collection<V> put(K key, V value)
Collection<V> remove(K key)
void putAll(Map<? extends K,? extends Collection<V>> m)
void clear()
Collection<V> values()
Collection<V> getOrDefault(K key, Collection<V> defaultValue)
void replaceAll(java.util.function.BiFunction<? super K,? super Collection<V>,? extends Collection<V>> function)
Collection<V> replace(K key, Collection<V> value)
Copyright © 2013-2015. All Rights Reserved.