cakoose.util.collection
Class RevertMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
cakoose.util.collection.RevertMap<K,V>
- All Implemented Interfaces:
- Map<K,V>
public final class RevertMap<K,V>
- extends AbstractMap<K,V>
A map that supports 'mark()' and 'revert()'. Calling 'mark()' will
push a save-point onto a stack. Calling 'revert()' will revert the
collection's data to what it was at the latest save-point on the stack
and then pop that save-point off the stack.
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
RevertMap
public RevertMap()
mark
public void mark()
revert
public void revert()
size
public int size()
- Specified by:
size in interface Map<K,V>- Overrides:
size in class AbstractMap<K,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Map<K,V>- Overrides:
isEmpty in class AbstractMap<K,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface Map<K,V>- Overrides:
containsKey in class AbstractMap<K,V>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue in interface Map<K,V>- Overrides:
containsValue in class AbstractMap<K,V>
get
public V get(Object key)
- Specified by:
get in interface Map<K,V>- Overrides:
get in class AbstractMap<K,V>
put
public V put(K key,
V value)
- Specified by:
put in interface Map<K,V>- Overrides:
put in class AbstractMap<K,V>
remove
public V remove(Object key)
- Specified by:
remove in interface Map<K,V>- Overrides:
remove in class AbstractMap<K,V>
putAll
public void putAll(Map<? extends K,? extends V> t)
- Specified by:
putAll in interface Map<K,V>- Overrides:
putAll in class AbstractMap<K,V>
clear
public void clear()
- Specified by:
clear in interface Map<K,V>- Overrides:
clear in class AbstractMap<K,V>
keySet
public Set<K> keySet()
- Specified by:
keySet in interface Map<K,V>- Overrides:
keySet in class AbstractMap<K,V>
values
public Collection<V> values()
- Specified by:
values in interface Map<K,V>- Overrides:
values in class AbstractMap<K,V>
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface Map<K,V>- Specified by:
entrySet in class AbstractMap<K,V>