|
JUtil | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> net.cscott.jutil.PersistentEnvironment<K,V>
public class PersistentEnvironment<K,V>
PersistentEnvironment
is an Environment
built on a PersistentMap
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
PersistentEnvironment()
Creates a PersistentEnvironment with no mappings. |
|
PersistentEnvironment(Map<K2,V2> m)
Creates a PersistentEnvironment with the same
mappings as the given Map . |
Method Summary | |
---|---|
void |
clear()
Remove all mappings from this map. |
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the
specified key. |
Set<Map.Entry<K,V>> |
entrySet()
Returns a set view of the mappings contained in this map. |
V |
get(Object key)
Returns the value to which this map maps the specified key. |
Environment.Mark |
getMark()
Get a mark that will allow you to restore the current state of this environment. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
V |
put(K key,
V value)
Associates the specified value with the specified key in this map. |
V |
remove(Object key)
Removes the mapping for this key from this map if present. |
int |
size()
Returns the numer of key-value mappings in this map. |
void |
undoToMark(Environment.Mark m)
Undo all changes since the supplied mark, restoring the map to its state at the time the mark was taken. |
Methods inherited from class java.util.AbstractMap |
---|
clone, containsValue, equals, hashCode, keySet, putAll, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
containsValue, equals, hashCode, keySet, putAll, values |
Constructor Detail |
---|
public PersistentEnvironment()
PersistentEnvironment
with no mappings.
public PersistentEnvironment(Map<K2,V2> m)
PersistentEnvironment
with the same
mappings as the given Map
.
Method Detail |
---|
public void clear()
clear
in interface Map<K,V>
clear
in class AbstractMap<K,V>
public boolean isEmpty()
true
if this map contains no key-value mappings.
isEmpty
in interface Map<K,V>
isEmpty
in class AbstractMap<K,V>
public int size()
size
in interface Map<K,V>
size
in class AbstractMap<K,V>
public V get(Object key)
get
in interface Map<K,V>
get
in class AbstractMap<K,V>
public V put(K key, V value)
put
in interface Map<K,V>
put
in class AbstractMap<K,V>
public boolean containsKey(Object key)
true
if this map contains a mapping for the
specified key.
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public V remove(Object key)
remove
in interface Map<K,V>
remove
in class AbstractMap<K,V>
public Environment.Mark getMark()
getMark
in interface Environment<K,V>
public void undoToMark(Environment.Mark m)
undoToMark
in interface Environment<K,V>
public Set<Map.Entry<K,V>> entrySet()
entrySet
in interface Map<K,V>
entrySet
in class AbstractMap<K,V>
|
JUtil | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |