Interface KastMapState<UK,UV>
-
public interface KastMapState<UK,UV>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(UK key)Returns whether there exists the given mapping.Iterable<Map.Entry<UK,UV>>entries()Returns all the mappings in the state.UVget(UK key)Returns the current value associated with the given key.booleanisEmpty()Returns true if this state contains no key-value mappings, otherwise false.Iterator<Map.Entry<UK,UV>>iterator()Iterates over all the mappings in the state.Iterable<UK>keys()Returns all the keys in the state.voidput(UK key, UV value)Associates a new value with the given key.voidputAll(Map<UK,UV> map)Copies all of the mappings from the given map into the state.voidremove(UK key)Deletes the mapping of the given key.Iterable<UV>values()Returns all the values in the state.
-
-
-
Method Detail
-
get
UV get(UK key) throws Exception
Returns the current value associated with the given key.- Parameters:
key- The key of the mapping- Returns:
- The value of the mapping with the given key
- Throws:
Exception- Thrown if the system cannot access the state.
-
put
void put(UK key, UV value) throws Exception
Associates a new value with the given key.- Parameters:
key- The key of the mappingvalue- The new value of the mapping- Throws:
Exception- Thrown if the system cannot access the state.
-
putAll
void putAll(Map<UK,UV> map) throws Exception
Copies all of the mappings from the given map into the state.- Parameters:
map- The mappings to be stored in this state- Throws:
Exception- Thrown if the system cannot access the state.
-
remove
void remove(UK key) throws Exception
Deletes the mapping of the given key.- Parameters:
key- The key of the mapping- Throws:
Exception- Thrown if the system cannot access the state.
-
contains
boolean contains(UK key) throws Exception
Returns whether there exists the given mapping.- Parameters:
key- The key of the mapping- Returns:
- True if there exists a mapping whose key equals to the given key
- Throws:
Exception- Thrown if the system cannot access the state.
-
entries
Iterable<Map.Entry<UK,UV>> entries() throws Exception
Returns all the mappings in the state.- Returns:
- An iterable view of all the key-value pairs in the state.
- Throws:
Exception- Thrown if the system cannot access the state.
-
keys
Iterable<UK> keys() throws Exception
Returns all the keys in the state.- Returns:
- An iterable view of all the keys in the state.
- Throws:
Exception- Thrown if the system cannot access the state.
-
values
Iterable<UV> values() throws Exception
Returns all the values in the state.- Returns:
- An iterable view of all the values in the state.
- Throws:
Exception- Thrown if the system cannot access the state.
-
iterator
Iterator<Map.Entry<UK,UV>> iterator() throws Exception
Iterates over all the mappings in the state.- Returns:
- An iterator over all the mappings in the state
- Throws:
Exception- Thrown if the system cannot access the state.
-
-