public interface WildcardMap
getNoExpansion()
:
WildcardMap wc = new WildcardMap(); wc.put("abc", new Integer(1)); wc.put("a*", new Integer(2)); wc.getNoExpansion("abc") => 1 wc.getNoExpansion("a*") => 2 wc.getNoExpansion("xyz") => nullThis behaviour is similiar to a
Map
.getWithExpansion()
. This Operations matches the requested Key to all contained Keys. If the Key
of an Entry contains the Wildcard Character '*' it is matched as expected by the semantic of '*'.
The Operations returns an array of all matching entries:
wc.getWithExpansion("abc") => [1,2] wc.getWithExpansion("a") => [2] wc.getWithExpansion("abcd") => [2] wc.getWithExpansion("xyz") => []
Modifier and Type | Method and Description |
---|---|
void |
clear()
clear this map
|
Object |
getNoExpansion(Object key)
Returns the value to which this map maps the specified key.
|
Object[] |
getWithExpansion(Object key)
Returns the value to which this map maps the specified key.
|
Object |
put(Object key,
Object value)
The operation
put associates the specified value with the specified key in
this map. |
Object |
remove(Object key)
remove the specified key from this Map.
|
void clear()
Object put(Object key, Object value)
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.key
- key with which String representation the specified value is to be associated.value
- value to be associated with the specified key.Object getNoExpansion(Object key)
key
- key whose associated value is to be returnedObject[] getWithExpansion(Object key)
key
- key whose associated value is to be returnedCopyright © 2017 JacORB. All rights reserved.