public class CategoricalAttributeType extends java.lang.Object implements ICategoricalAttributeType
| Constructor and Description |
|---|
CategoricalAttributeType(java.util.List<java.lang.String> domain)
Constructor setting the domain of the categorical attribute values.
|
| Modifier and Type | Method and Description |
|---|---|
IAttributeValue<java.lang.String> |
buildAttributeValue(java.lang.Object value)
Casts the value to the respective type and returns an attribute value with the creating attribute type as the referenced type.
|
IAttributeValue<java.lang.String> |
buildAttributeValue(java.lang.String stringDescription)
Builds an attribute value object from a string description.
|
java.util.List<java.lang.String> |
getDomain() |
boolean |
isValidValue(java.lang.String value)
Validates whether a value conforms to this type.
|
java.lang.String |
toString() |
public CategoricalAttributeType(java.util.List<java.lang.String> domain)
domain - The domain categorical values may stem from.public java.util.List<java.lang.String> getDomain()
getDomain in interface ICategoricalAttributeTypepublic boolean isValidValue(java.lang.String value)
IAttributeTypeisValidValue in interface IAttributeType<java.lang.String>value - The value to validated.public IAttributeValue<java.lang.String> buildAttributeValue(java.lang.Object value)
IAttributeTypebuildAttributeValue in interface IAttributeType<java.lang.String>value - The value of the attribute.public IAttributeValue<java.lang.String> buildAttributeValue(java.lang.String stringDescription)
IAttributeTypebuildAttributeValue in interface IAttributeType<java.lang.String>stringDescription - A String-format description of the attribute's value.public java.lang.String toString()
toString in class java.lang.Object