AttributeMap is an immutable Map. Additionally, there are
several methods for common operations (union,
remove, intersect); these methods return new AttributeMap
instances.
Although any non-null Object can be a key or value in an
AttributeMap, typically the keys are fields of TextAttribute.
See Also:TextAttribute
AttributeMap(java.util.Map map) Create an AttributeMap with the same key-value
entries as the given Map.
Parameters: map - a Map whose key-value entries willbecome the entries for this AttributeMap.
public
AttributeMap(Hashtable hashtable) Create an AttributeMap with the same key-value
entries as the given Hashtable.
Parameters: hashtable - a Hashtable whose key-value entries willbecome the entries for this AttributeMap.
public
AttributeMap(Object key, Object value) Create an AttributeMap with a single entry of
{attribute, value}.
Create an AttributeMap with the same key-value
entries as the given Map.
Parameters: map - a Map whose key-value entries willbecome the entries for this AttributeMap. mapis not modified, and must not contain null keys or values.
Create an AttributeMap with the same key-value
entries as the given Hashtable.
Parameters: hashtable - a Hashtable whose key-value entries willbecome the entries for this AttributeMap. tableis not modified.
Create an AttributeMap with a single entry of
{attribute, value}.
Parameters: key - the key in this AttributeMap's single entry Parameters: value - the value in this AttributeMap's single entry
Return a AttributeMap which contains entries in this AttributeMap,
along with an entry for . If attribute
is already present in this AttributeMap its value becomes value.
Return a AttributeMap which contains entries in this AttributeMap
and in rhs. If an attribute appears in both StyleSets the
value from rhs is used.
The Map's keys and values must be non-null.
Return the value associated with the given key. If the
key is not in this AttributeMap null is returned.
Parameters: key - the key to look up the value associated with key, ornull if key is not in this AttributeMap