org.jacorb.notification.util
Class DefaultWildcardMap

java.lang.Object
  extended byorg.jacorb.notification.util.DefaultWildcardMap
All Implemented Interfaces:
WildcardMap

public class DefaultWildcardMap
extends java.lang.Object
implements WildcardMap

Version:
$Id: DefaultWildcardMap.java,v 1.2 2005/08/21 13:38:40 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
static int DEFAULT_TOPLEVEL_SIZE
           
 
Constructor Summary
DefaultWildcardMap()
           
DefaultWildcardMap(int topLevelSize)
           
 
Method Summary
 void clear()
          clear this map
 java.lang.Object getNoExpansion(java.lang.Object key)
          Returns the value to which this map maps the specified key.
 java.lang.Object[] getWithExpansion(java.lang.Object key)
          Returns the value to which this map maps the specified key.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          The operation put associates the specified value with the specified key in this map.
 java.lang.Object remove(java.lang.Object key)
          remove the specified key from this Map.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TOPLEVEL_SIZE

public static final int DEFAULT_TOPLEVEL_SIZE
See Also:
Constant Field Values
Constructor Detail

DefaultWildcardMap

public DefaultWildcardMap(int topLevelSize)

DefaultWildcardMap

public DefaultWildcardMap()
Method Detail

clear

public void clear()
Description copied from interface: WildcardMap
clear this map

Specified by:
clear in interface WildcardMap

remove

public java.lang.Object remove(java.lang.Object key)
Description copied from interface: WildcardMap
remove the specified key from this Map.

Specified by:
remove in interface WildcardMap

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Description copied from interface: WildcardMap
The operation put associates the specified value with the specified key in this map. The String representation of the Key toString() is used. If the map previously contained a mapping for this key, the old value is replaced by the specified value.

Specified by:
put in interface WildcardMap
Parameters:
key - key with which String representation the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key.

getNoExpansion

public java.lang.Object getNoExpansion(java.lang.Object key)
Description copied from interface: WildcardMap
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key.

Specified by:
getNoExpansion in interface WildcardMap
Parameters:
key - key whose associated value is to be returned
Returns:
the value to which this map maps the specified key, or null if the map contains no mapping for this key.

getWithExpansion

public java.lang.Object[] getWithExpansion(java.lang.Object key)
Description copied from interface: WildcardMap
Returns the value to which this map maps the specified key. Additionaly return all Values which keys contain a Wildcard and match the requested key. Returns null if the map contains no mapping for this key.

Specified by:
getWithExpansion in interface WildcardMap
Parameters:
key - key whose associated value is to be returned
Returns:
an Array of all Matching entries or null if no matching entry could be found.

toString

public java.lang.String toString()