public class AttributeImpl extends Object implements Attribute
Attribute
.
This class is Serializable
and care should be taken with compatibility if changes are
made.
For what constitutes a compatible change in serialization, see Sun's Guidelines.
Modifier and Type | Field and Description |
---|---|
protected String |
name
Nontransient field that holds the name of the
Attribute . |
Constructor and Description |
---|
AttributeImpl(Attribute attribute)
Copy Constructor
|
AttributeImpl(String name,
List<Serializable> values)
Multivalued Constructor
|
AttributeImpl(String name,
Serializable value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(Serializable value)
Adds a value to this
Attribute |
void |
clearValues()
Clears all
Attribute values |
boolean |
equals(Object o) |
String |
getName()
The name of this
Attribute . |
Serializable |
getValue()
The value of this
Attribute . |
List<Serializable> |
getValues()
|
int |
hashCode() |
String |
toString() |
public AttributeImpl(String name, Serializable value)
public AttributeImpl(String name, List<Serializable> values)
public AttributeImpl(Attribute attribute)
public String getName()
Attribute
Attribute
.public Serializable getValue()
Attribute
Attribute
.
If this Attribute
is multivalued ( AttributeDescriptor.isMultiValued()
==true), this method must return the first, if any, value as an instance of the Class
identified in the associated AttributeDescriptor#getClass()
method.
getValue
in interface Attribute
Serializable
- the value of this Attribute
public List<Serializable> getValues()
Attribute
public void addValue(Serializable value)
Attribute
value
- the value to addpublic void clearValues()
Attribute
valuesThis work is licensed under a Creative Commons Attribution 4.0 International License.