public final class WindowMapState<W,UV> extends Object implements WindowState<W>
MapState
which is easier to update based on window namespace.Constructor and Description |
---|
WindowMapState(InternalMapState<RowData,W,RowData,UV> windowState) |
Modifier and Type | Method and Description |
---|---|
void |
clear(W window)
Removes the value mapped under current key and the given window.
|
boolean |
contains(W window,
RowData key)
Returns whether there exists the given mapping.
|
Iterable<Map.Entry<RowData,UV>> |
entries(W window)
Returns all the mappings in the state.
|
UV |
get(W window,
RowData key)
Returns the current value associated with the given key.
|
boolean |
isEmpty(W window)
Returns true if this state contains no key-value mappings, otherwise false.
|
Iterator<Map.Entry<RowData,UV>> |
iterator(W window)
Iterates over all the mappings in the state.
|
Iterable<RowData> |
keys(W window)
Returns all the keys in the state.
|
void |
put(W window,
RowData key,
UV value)
Associates a new value with the given key.
|
void |
putAll(W window,
Map<RowData,UV> map)
Copies all of the mappings from the given map into the state.
|
void |
remove(W window,
RowData key)
Deletes the mapping of the given key.
|
Iterable<UV> |
values(W window)
Returns all the values in the state.
|
public WindowMapState(InternalMapState<RowData,W,RowData,UV> windowState)
public void clear(W window)
WindowState
clear
in interface WindowState<W>
public UV get(W window, RowData key) throws Exception
key
- The key of the mappingException
- Thrown if the system cannot access the state.public void put(W window, RowData key, UV value) throws Exception
key
- The key of the mappingvalue
- The new value of the mappingException
- Thrown if the system cannot access the state.public void putAll(W window, Map<RowData,UV> map) throws Exception
map
- The mappings to be stored in this stateException
- Thrown if the system cannot access the state.public void remove(W window, RowData key) throws Exception
key
- The key of the mappingException
- Thrown if the system cannot access the state.public boolean contains(W window, RowData key) throws Exception
key
- The key of the mappingException
- Thrown if the system cannot access the state.public Iterable<Map.Entry<RowData,UV>> entries(W window) throws Exception
Exception
- Thrown if the system cannot access the state.public Iterable<RowData> keys(W window) throws Exception
Exception
- Thrown if the system cannot access the state.public Iterable<UV> values(W window) throws Exception
Exception
- Thrown if the system cannot access the state.public Iterator<Map.Entry<RowData,UV>> iterator(W window) throws Exception
Exception
- Thrown if the system cannot access the state.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.