Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.miamm.soapmmil.engine
Class MapToMany  view MapToMany download MapToMany.java

java.lang.Object
  extended byorg.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 $

Field Summary
(package private) static org.apache.log4j.Logger _logger
           
protected  java.util.Map _map
           
(package private) static java.lang.String UCLASSNAME
           
 
Constructor Summary
MapToMany(java.util.Map map)
           
 
Method Summary
 boolean containsKey(java.lang.Object key)
          Returns true if this map contains a mapping for the specified key.
 boolean containsValue(java.lang.Object key)
           
protected abstract  java.util.Collection createCollection()
          Returns a new empty Collection.
 java.util.Collection get(java.lang.Object key)
          Returns the values to which this MapToMany maps the specified key.
 void put(java.lang.Object key, java.lang.Object value)
          Associates the specified value with the specified key in this map (optional operation).
 void remove(java.lang.Object key, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_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
Constructor Detail

MapToMany

public MapToMany(java.util.Map map)
Method Detail

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.