|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The standard Java Map extended with some utility functions to ease its use in the particular case that the keys are String (subject) and maps against List of String (attributes).
AttributeMapFactory
Method Summary | |
void |
addAttribute(java.lang.String key,
java.lang.String value)
Convenience method to add a single attribute to the existing set of attributes associated with a key. |
void |
addAttributes(java.lang.String key,
java.util.List values)
Convenience method to add a set of attributes. |
java.util.List |
getAttributes(java.lang.String key)
Convenience method to get the right return type, and to get an empty list in case of no match. |
boolean |
hasMapping(java.lang.String key,
java.lang.String value)
This method has the same semantics as the call getAttributes(key).contains(value)
but may be optimized for the particular Map |
java.lang.String |
removeAttribute(java.lang.String key,
java.lang.String value)
Removal of a particular attribute in the list of attributes for the given subject. |
void |
terminate()
Terminate all Timer objects responsible for refreshing the content of the AttributeMap. |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
public java.util.List getAttributes(java.lang.String key)
Map.get(Object)
public void addAttributes(java.lang.String key, java.util.List values)
This is typically implemented as an iteration of
calls to addAttribute(String, String)
,
one call for each value in the List.
This feature may be overriden by a particular Map implementation.
key
- the keyvalues
- List of String with attributesMap.put(Object, Object)
public void addAttribute(java.lang.String key, java.lang.String value)
key
- the keyvalue
- The attribute to addMap.put(Object, Object)
public boolean hasMapping(java.lang.String key, java.lang.String value)
getAttributes(key).contains(value)
key
- the keyvalue
- the value to match against
public java.lang.String removeAttribute(java.lang.String key, java.lang.String value)
key
- the keyvalue
- a single value to remove from the list of values
associated with the keyMap.remove(java.lang.Object)
public void terminate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |