public class AttributeSet extends Object implements AttributeListener<Object>
Attribute
s. It is constructed by passing in a list of AttributeDefinition
s.
AttributeSets are initially unprotected, which means that the contained attributes can be modified. If the protect()
method is invoked
then only attributes which are not AttributeDefinition.isImmutable()
can be modified from then on.Constructor and Description |
---|
AttributeSet(Class<?> klass,
AttributeDefinition<?>... attributeDefinitions) |
AttributeSet(Class<?> klass,
AttributeSet attributeSet,
AttributeDefinition<?>... attributeDefinitions) |
AttributeSet(String name,
AttributeDefinition<?>... attributeDefinitions) |
AttributeSet(String name,
AttributeSet attributeSet,
AttributeDefinition<?>[] attributeDefinitions) |
Modifier and Type | Method and Description |
---|---|
<T> Attribute<T> |
attribute(AttributeDefinition<T> def) |
<T> Attribute<T> |
attribute(String name) |
void |
attributeChanged(Attribute<Object> attribute,
Object oldValue) |
AttributeSet |
checkProtection() |
<T> boolean |
contains(AttributeDefinition<T> def) |
boolean |
contains(String name) |
boolean |
equals(Object obj) |
String |
getName() |
int |
hashCode() |
boolean |
isProtected() |
AttributeSet |
protect()
Returns a new ValueSet where immutable
Attribute s are write-protected |
void |
read(AttributeSet other) |
void |
reset() |
String |
toString() |
String |
toString(String name) |
@SafeVarargs public AttributeSet(Class<?> klass, AttributeDefinition<?>... attributeDefinitions)
@SafeVarargs public AttributeSet(String name, AttributeDefinition<?>... attributeDefinitions)
@SafeVarargs public AttributeSet(Class<?> klass, AttributeSet attributeSet, AttributeDefinition<?>... attributeDefinitions)
public AttributeSet(String name, AttributeSet attributeSet, AttributeDefinition<?>[] attributeDefinitions)
public String getName()
public boolean contains(String name)
public <T> boolean contains(AttributeDefinition<T> def)
public <T> Attribute<T> attribute(AttributeDefinition<T> def)
public void read(AttributeSet other)
public AttributeSet protect()
Attribute
s are write-protectedpublic boolean isProtected()
public AttributeSet checkProtection()
public void reset()
public void attributeChanged(Attribute<Object> attribute, Object oldValue)
attributeChanged
in interface AttributeListener<Object>
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.