public interface MapState<K,V> extends UnaryState<Map<K,V>>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
contains(K key)
Returns whether there exists the given mapping.
|
default Iterable<Map.Entry<K,V>> |
entries()
Returns all the mappings in the state
|
V |
get(K key)
Returns the current value associated with the given key.
|
default Iterator<Map.Entry<K,V>> |
iterator()
Iterates over all the mappings in the state.
|
default Iterable<K> |
keys()
Returns all the keys in the state
|
void |
put(K key,
V value)
Associates a new value with the given key.
|
void |
putAll(Map<K,V> map)
Copies all of the mappings from the given map into the state.
|
void |
remove(K key)
Deletes the mapping of the given key.
|
void |
update(Map<K,V> map)
Resets the state value.
|
default Iterable<V> |
values()
Returns all the values in the state.
|
getsetCurrentKeyV get(K key)
key - The key of the mappingvoid put(K key, V value)
key - The key of the mappingvalue - The new value of the mappingvoid update(Map<K,V> map)
map - The mappings for reset in this statevoid putAll(Map<K,V> map)
map - The mappings to be stored in this statevoid remove(K key)
key - The key of the mappingdefault boolean contains(K key)
key - The key of the mappingdefault Iterable<Map.Entry<K,V>> entries()
default Iterable<K> keys()
default Iterable<V> values()
Copyright © 2020. All rights reserved.