net.cscott.jutil
public class HashEnvironment<K,V> extends AbstractMap<K,V> implements Environment<K,V>
HashEnvironment
is an Environment
using
a HashMap
as the backing store.
Version: $Id: HashEnvironment.java,v 1.2 2004/01/13 21:40:19 cananian Exp $
Constructor Summary | |
---|---|
HashEnvironment() Creates a HashEnvironment . | |
<K2 extends K,V2 extends V> | HashEnvironment(Map<K2,V2> 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. |
MapSet<K,V> | entrySet() The Set returned by this method is really a
MapSet . |
V | get(Object key) Returns the value to which this map maps the specified key. |
Environment.Mark | getMark() |
static void | main(String[] argv) Self-test function. |
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 number of key-value mappings in this map. |
void | undoToMark(Environment.Mark m) |
HashEnvironment
.HashEnvironment
with all the mappings in
the given map.true
if this map contains a mapping for the
specified key.Set
returned by this method is really a
MapSet
.