com.sapportals.portal.prt.util
Interface MultiValuedMap

All Known Implementing Classes:
MultiValuedHashMap

public interface MultiValuedMap

Copyright (c) SAP Portals Europe GmbH 2001

Version:
$Revision: #3 $

Method Summary
 void clear()
          Clears the map, i.e. removes all key to value assigments.
 void getKeys(java.lang.Object[] keys)
          Gets an Array of keys.
 java.util.Enumeration getKeysEnumeration()
          Gets an Enumeration of all keys
 java.lang.Object getValue(java.lang.Object key)
          Gets a single value assigned to one key.
 int getValueCount(java.lang.Object key)
          Gets the number of values assigned to a key.
 void getValues(java.lang.Object key, java.lang.Object[] values)
          Gets all values assigned to the specified key as an Array
 java.util.Iterator getValuesIterator(java.lang.Object key)
          Gets an Iterator of all values assigned to a key.
 void put(java.lang.Object key, java.lang.Object value)
          Adds a key->value couple to the map.
 void remove(java.lang.Object key)
          Removes a key with all its assigned values.
 void remove(java.lang.Object key, java.lang.Object value)
          Removes a key/value combination from the map.
 int size()
          Gets the number of keys that were assigned values.
 

Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object value)
Adds a key->value couple to the map.
Parameters:
key - the key identifying a set of values
value - one more value assignd to key

remove

public void remove(java.lang.Object key)
Removes a key with all its assigned values.
Parameters:
attribute - The name of the attribute.
key -  

remove

public void remove(java.lang.Object key,
                   java.lang.Object value)
Removes a key/value combination from the map.
Parameters:
key - The key.
value - The value that was possibly assigned to key and should be removed now.

getKeysEnumeration

public java.util.Enumeration getKeysEnumeration()
Gets an Enumeration of all keys
Returns:
an Enumeration of all keys

getKeys

public void getKeys(java.lang.Object[] keys)
Gets an Array of keys.
Parameters:
an - keys an Array to contain all the keys that have values assigned.
keys -  

size

public int size()
Gets the number of keys that were assigned values.
Returns:
the number of keys that were assigned values.

getValueCount

public int getValueCount(java.lang.Object key)
Gets the number of values assigned to a key.
Parameters:
key - the key to retrieve the number of values assigned to
Returns:
the number of values assigned to the specified key.

getValuesIterator

public java.util.Iterator getValuesIterator(java.lang.Object key)
Gets an Iterator of all values assigned to a key.
Parameters:
key - the key to get all values for.
Returns:
an Iterator of all values assigned to key, or possibly null if no value at all was assigned to key.

getValues

public void getValues(java.lang.Object key,
                      java.lang.Object[] values)
Gets all values assigned to the specified key as an Array
Parameters:
key - The name of the queried key
values - An array to copy the values assigned to key into.

getValue

public java.lang.Object getValue(java.lang.Object key)
Gets a single value assigned to one key.
Parameters:
key - the key to get the value for.
Returns:
The lone value of an attribute. Note: If the attribute is multi-valued, any one the values can be the result of a call to this method.

clear

public void clear()
Clears the map, i.e. removes all key to value assigments.