public class HashAttributeSet extends Object implements AttributeSet, Serializable
AttributeSet
implementation with characteristics of a hash map.
Modifier | Constructor and Description |
---|---|
|
HashAttributeSet()
Construct a new, empty attribute set.
|
|
HashAttributeSet(Attribute attribute)
Construct a new attribute set,
initially populated with the given attribute.
|
|
HashAttributeSet(Attribute[] attributes)
Construct a new attribute set,
initially populated with the values from the
given array.
|
protected |
HashAttributeSet(Attribute[] attributes,
Class<?> interfaceName)
Construct a new attribute set, where the members of the attribute
set are restricted to the given interface.
|
protected |
HashAttributeSet(Attribute attribute,
Class<?> interfaceName)
Construct a new attribute set, initially populated with the given
attribute, where the members of the attribute set are restricted to the
given interface.
|
|
HashAttributeSet(AttributeSet attributes)
Construct a new attribute set,
initially populated with the values from the given set.
|
protected |
HashAttributeSet(AttributeSet attributes,
Class<?> interfaceName)
Construct a new attribute set, initially populated with the
values from the given set where the members of the attribute
set are restricted to the given interface.
|
protected |
HashAttributeSet(Class<?> interfaceName)
Construct a new, empty attribute set, where the members of
the attribute set are restricted to the given interface.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Attribute attribute)
Adds the specified attribute to this attribute set if it is not
already present, first removing any existing in the same
attribute category as the specified attribute value.
|
boolean |
addAll(AttributeSet attributes)
Adds all of the elements in the specified set to this attribute.
|
void |
clear()
Removes all attributes from this attribute set.
|
boolean |
containsKey(Class<?> category)
Returns true if this attribute set contains an
attribute for the specified category.
|
boolean |
containsValue(Attribute attribute)
Returns true if this attribute set contains the given
attribute.
|
boolean |
equals(Object object)
Compares the specified object with this attribute set for equality.
|
Attribute |
get(Class<?> category)
Returns the attribute value which this attribute set contains in the
given attribute category.
|
int |
|