java.lang.Object
org.miamm.soapmmil.engine.MapToMany
- Direct Known Subclasses:
- ServiceTable
- public abstract class MapToMany
- extends java.lang.Object
An object that maps keys to values. A MapToMany cannot contain
duplicate keys; BUT unlike Maps, each key can map to any number of
values.
FIXME: if i really gave a damn, i would make this an interface,
and create an abstract class called "MapToCollection" which
implements this interface
- Version:
- $Revision: 1.1 $
$Date: 2003/04/19 08:24:39 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_logger
static org.apache.log4j.Logger _logger
UCLASSNAME
static final java.lang.String UCLASSNAME
- See Also:
- Constant Field Values
_map
protected java.util.Map _map
MapToMany
public MapToMany(java.util.Map map)
put
public void put(java.lang.Object key,
java.lang.Object value)
- Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping
for this key, the old value is replaced by the specified value.
(A map mis said to contain a mapping for a key kif and only if
m.containsKey(k) would return true .
remove
public void remove(java.lang.Object key,
java.lang.Object value)
get
public java.util.Collection get(java.lang.Object key)
- Returns the values to which this MapToMany maps the specified key.
Important difference
Returns null if and only if the MapToMany contains no mapping for
this key.
containsKey
public boolean containsKey(java.lang.Object key)
- Returns
true if this map contains a mapping for the
specified key. More formally, returns true if and only if this
map contains at a mapping for a key k such that (key==null ?
k==null : key.equals(k))
containsValue
public boolean containsValue(java.lang.Object key)
createCollection
protected abstract java.util.Collection createCollection()
- Returns a new empty Collection.