E
- public class EnumeratedProperty<E> extends AbstractEnumeratedProperty<E,Object>
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptorFactory |
FACTORY |
choices, choicesByLabel, labelsByChoice
DEFAULT_DELIMITER, DEFAULT_NUMERIC_DELIMITER
Constructor and Description |
---|
EnumeratedProperty(String theName,
String theDescription,
String[] theLabels,
E[] theChoices,
int defaultIndex,
float theUIOrder)
Constructor for EnumeratedProperty.
|
Modifier and Type | Method and Description |
---|---|
String |
asDelimitedString(Object value)
Formats the object onto a string suitable for storage within the property
map.
|
String |
errorFor(Object value)
Validation function that returns a diagnostic error message for a sample
property value.
|
Class<Object> |
type()
Denotes the value datatype.
|
Object |
valueFrom(String value)
If the property is multi-valued then return the separate values after
parsing the propertyString provided.
|
choiceFrom, choices, defaultAsString, nonLegalValueMsgFor
addAttributesTo, areEqual, asDelimitedString, asString, attributeValuesById, compareTo, defaultHasNullValue, defaultValue, description, equals, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valueErrorFor, valuesErrorFor
public static final PropertyDescriptorFactory FACTORY
public EnumeratedProperty(String theName, String theDescription, String[] theLabels, E[] theChoices, int defaultIndex, float theUIOrder)
theName
- StringtheDescription
- StringtheLabels
- String[]theChoices
- E[]defaultIndex
- inttheUIOrder
- floatIllegalArgumentException
public Class<Object> type()
PropertyDescriptor
PropertyDescriptor.type()
public String errorFor(Object value)
AbstractProperty
errorFor
in interface PropertyDescriptor<Object>
errorFor
in class AbstractProperty<Object>
value
- ObjectPropertyDescriptor.errorFor(Object)
public Object valueFrom(String value) throws IllegalArgumentException
PropertyDescriptor
value
- StringIllegalArgumentException
PropertyDescriptor.valueFrom(String)
public String asDelimitedString(Object value)
AbstractProperty
asDelimitedString
in interface PropertyDescriptor<Object>
asDelimitedString
in class AbstractProperty<Object>
value
- ObjectPropertyDescriptor.asDelimitedString(Object)
Copyright © 2002-2017 PMD. All Rights Reserved.