ValueType
- value typepublic class BasicAttribute<ValueType> extends BaseAttribute<ValueType> implements Cloneable
Object.toString()
method on an attribute's
values. Therefore any value should return something reasonable for that method and what is returned
should be very stable across versions.Modifier and Type | Field and Description |
---|---|
private Comparator<ValueType> |
comparator
Comparator for this attribute.
|
private ArrayList<AttributeEncoder> |
encoders
Map of attribute encoders for this attribute, keyed off of category.
|
private String |
id
ID of this attribute.
|
private Collection<ValueType> |
values
Set of values for this attribute.
|
Constructor and Description |
---|
BasicAttribute()
Constructor.
|
BasicAttribute(String attributeId)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BasicAttribute<ValueType> |
clone() |
List<AttributeEncoder> |
getEncoders()
Gets the list of attribute encoders usable with this attribute.
|
String |
getId()
Gets the unique ID of the attribute.
|
Comparator<ValueType> |
getValueComparator()
Gets the comparator used to sort values.
|
Collection<ValueType> |
getValues()
Gets the values of the attribute.
|
void |
setId(String newID)
Set id of this attribute.
|
void |
setValueComparator(Comparator<ValueType> newComparator)
Set value comparator for this attribute.
|
void |
setValues(Collection<ValueType> newValues)
Replace the current set of values with the given set.
|
compareTo, equals, getDisplayDescriptions, getDisplayNames, hashCode, toString
private String id
private ArrayList<AttributeEncoder> encoders
private Collection<ValueType> values
private Comparator<ValueType> comparator
public BasicAttribute()
public BasicAttribute(String attributeId)
attributeId
- the ID of this attributepublic List<AttributeEncoder> getEncoders()
getEncoders
in class BaseAttribute<ValueType>
public String getId()
getId
in class BaseAttribute<ValueType>
public void setId(String newID)
newID
- new IDpublic Comparator<ValueType> getValueComparator()
getValueComparator
in class BaseAttribute<ValueType>
public void setValueComparator(Comparator<ValueType> newComparator)
newComparator
- new value comparatorpublic Collection<ValueType> getValues()
getValues
in class BaseAttribute<ValueType>
public void setValues(Collection<ValueType> newValues)
newValues
- new values to replace existing onespublic BasicAttribute<ValueType> clone()
Copyright © 1999-2012. All Rights Reserved.