com.sapportals.portal.prt.util

Interface MultiValuedMap

All Known Implementing Classes:
MultiValuedHashMap

public interface MultiValuedMap

Copyright (c) SAP Portals Europe GmbH 2001


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

Method Detail

put

void put(Object key,
         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

void remove(Object key)
Removes a key with all its assigned values.

Parameters:
key - The key.

remove

void remove(Object key,
            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

Enumeration getKeysEnumeration()
Gets an Enumeration of all keys

Returns:
an Enumeration of all keys

getKeys

void getKeys(Object[] keys)
Gets an Array of keys.

Parameters:
keys - an Array to contain all the keys that have values assigned.

size

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

Returns:
the number of keys that were assigned values.

getValueCount

int getValueCount(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

Iterator getValuesIterator(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

void getValues(Object key,
               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

Object getValue(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

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

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._apideprecated default EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice