Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
Instances of AttributeSet can be mutable through additional functions on the instance. Interfaces that accept AttributeSet generally assume that the sets may be referenced and not copied, thus callers must be careful not to subsequently mutate these sets.
Implementors must be sure to properly implement equals and hashCode, so that attribute sets may be compared and placed in hash tables. This set is equal to another set if each set is empty, or if the sets have the same number of attributes and each attribute in this set has an attribute with an equal name and value in the other set.
By definition, attributes placed in an attribute set must always be immutable, even if the set itself is not. Thus clients of AttributeSet can always take references to the names and values of attributes and rely on these not changing. The implementation of clone may also make this assumption to avoid doing a deep clone of the attributes themselves.
Method Summary | |
Object | clone()
|
boolean | contains(String attributeName,
Object value)
|
boolean | contains(AttributeSet attributes)
|
Object | get(String attributeName)
|
int | getSize()
|
boolean | isEmpty()
|
Enumeration | names()
|
Method Detail |
public boolean isEmpty()
public int getSize()
public Enumeration names()
public Object get(String attributeName)
public boolean contains(String attributeName, Object value)
public boolean contains(AttributeSet attributes)
public Object clone()
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |