net.sourceforge.pmd.lang.rule.properties
Class AbstractEnumeratedProperty<E,T>
java.lang.Object
net.sourceforge.pmd.lang.rule.properties.AbstractProperty<T>
net.sourceforge.pmd.lang.rule.properties.AbstractEnumeratedProperty<E,T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Comparable<PropertyDescriptor<?>>, PropertyDescriptor<T>
- Direct Known Subclasses:
- EnumeratedMultiProperty, EnumeratedProperty
public abstract class AbstractEnumeratedProperty<E,T>
- extends AbstractProperty<T>
- Author:
- Brian Remedios
Methods inherited from class net.sourceforge.pmd.lang.rule.properties.AbstractProperty |
addAttributesTo, areEqual, asDelimitedString, asDelimitedString, asString, attributeValuesById, compareTo, defaultHasNullValue, defaultValue, description, equals, errorFor, hashCode, isArray, isMultiValue, isRequired, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, toString, typeErrorFor, uiOrder, valueErrorFor, valuesErrorFor |
choicesByLabel
protected Map<String,E> choicesByLabel
labelsByChoice
protected Map<E,String> labelsByChoice
choices
protected Object[][] choices
AbstractEnumeratedProperty
public AbstractEnumeratedProperty(String theName,
String theDescription,
String[] theLabels,
E[] theChoices,
int[] choiceIndices,
float theUIOrder,
boolean isMulti)
- Parameters:
theName
- theDescription
- theLabels
- theChoices
- choiceIndices
- theUIOrder
- isMulti
-
- Throws:
IllegalArgumentException
defaultAsString
protected String defaultAsString()
- Overrides:
defaultAsString
in class AbstractProperty<T>
- Returns:
- String
nonLegalValueMsgFor
protected String nonLegalValueMsgFor(Object value)
- Method nonLegalValueMsgFor.
- Parameters:
value
- Object
- Returns:
- String
choiceFrom
protected E choiceFrom(String label)
- Method choiceFrom.
- Parameters:
label
- String
- Returns:
- E
choices
public Object[][] choices()
- Description copied from class:
AbstractProperty
- Returns a set of choice tuples if available, returns null if none are
defined.
- Specified by:
choices
in interface PropertyDescriptor<T>
- Overrides:
choices
in class AbstractProperty<T>
- Returns:
- Object[][]
- See Also:
PropertyDescriptor.choices()
Copyright © 2002-2015 InfoEther. All Rights Reserved.