E
- public class EnumeratedMultiProperty<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 |
---|
EnumeratedMultiProperty(String theName,
String theDescription,
String[] theLabels,
E[] theChoices,
int[] choiceIndices,
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.
|
boolean |
isMultiValue()
Returns whether the property is multi-valued, i.e.
|
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, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valueErrorFor, valuesErrorFor
public static final PropertyDescriptorFactory FACTORY
public EnumeratedMultiProperty(String theName, String theDescription, String[] theLabels, E[] theChoices, int[] choiceIndices, float theUIOrder)
theName
- StringtheDescription
- StringtheLabels
- String[]theChoices
- E[]choiceIndices
- int[]theUIOrder
- floatIllegalArgumentException
public Class<Object[]> type()
PropertyDescriptor
PropertyDescriptor.type()
public boolean isMultiValue()
AbstractProperty
isMultiValue
in interface PropertyDescriptor<Object[]>
isMultiValue
in class AbstractProperty<Object[]>
PropertyDescriptor.isMultiValue()
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.