|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractMap | +--harpoon.Util.Collections.HashEnvironment
A HashEnvironment
is an Environment
using
a HashMap
as the backing store.
Nested Class Summary |
Nested classes inherited from class harpoon.Util.Collections.Environment |
Environment.Mark |
Nested classes inherited from class java.util.Map |
Map.Entry |
Constructor Summary | |
HashEnvironment()
Creates a HashEnvironment . |
|
HashEnvironment(Map m)
Creates a HashEnvironment with all the mappings in
the given map. |
Method Summary | |
void |
clear()
Clears all mappings. |
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the
specified key. |
Set |
entrySet()
The Set returned by this method is really a
MapSet . |
Object |
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. |
static void |
main(String[] argv)
Self-test function. |
Object |
put(Object key,
Object value)
Associates the specified value with the specified key in this map. |
Object |
remove(Object key)
Removes the mapping for this key from this map if present. |
int |
size()
Returns the number 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, isEmpty, 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, isEmpty, keySet, putAll, values |
Constructor Detail |
public HashEnvironment()
HashEnvironment
.
public HashEnvironment(Map m)
HashEnvironment
with all the mappings in
the given map.
Method Detail |
public boolean containsKey(Object key)
true
if this map contains a mapping for the
specified key.
containsKey
in interface Map
containsKey
in class AbstractMap
public Object get(Object key)
get
in interface Map
get
in class AbstractMap
public Object put(Object key, Object value)
put
in interface Map
put
in class AbstractMap
public Object remove(Object key)
remove
in interface Map
remove
in class AbstractMap
public int size()
size
in interface Map
size
in class AbstractMap
public void clear()
clear
in interface Map
clear
in class AbstractMap
public Environment.Mark getMark()
Environment
getMark
in interface Environment
public void undoToMark(Environment.Mark m)
Environment
undoToMark
in interface Environment
public Set entrySet()
Set
returned by this method is really a
MapSet
.
entrySet
in interface Map
entrySet
in class AbstractMap
public static void main(String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |