|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object extended by net.sourceforge.pmd.properties.AbstractPMDProperty extended by net.sourceforge.pmd.properties.EnumeratedProperty<E>
public class EnumeratedProperty<E>
Defines a datatype with a set of preset values of any type as held within a pair of maps. While the values are not serialized out, the labels are and serve as keys to obtain the values.
Field Summary |
---|
Fields inherited from class net.sourceforge.pmd.properties.AbstractPMDProperty |
---|
multiValueDelimiter |
Fields inherited from interface net.sourceforge.pmd.PropertyDescriptor |
---|
emptyPropertySet |
Constructor Summary | |
---|---|
EnumeratedProperty(java.lang.String theName,
java.lang.String theDescription,
java.lang.String[] theLabels,
E[] theChoices,
float theUIOrder)
Constructor for EnumeratedProperty. |
|
EnumeratedProperty(java.lang.String theName,
java.lang.String theDescription,
java.lang.String[] theLabels,
E[] theChoices,
float theUIOrder,
int maxValues)
Constructor for EnumeratedProperty. |
Method Summary | |
---|---|
java.lang.String |
asDelimitedString(java.lang.Object value)
Method asDelimitedString. |
java.lang.String |
errorFor(java.lang.Object value)
Method errorFor. |
java.lang.Class<java.lang.Object> |
type()
Method type. |
java.lang.Object |
valueFrom(java.lang.String value)
Method valueFrom. |
Methods inherited from class net.sourceforge.pmd.properties.AbstractPMDProperty |
---|
areEqual, asString, choices, compareTo, defaultValue, description, isArray, isRequired, maxValueCount, maxValueCount, multiValueDelimiter, multiValueDelimiter, name, preferredRowCount, propertyErrorFor, typeErrorFor, uiOrder, valueErrorFor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumeratedProperty(java.lang.String theName, java.lang.String theDescription, java.lang.String[] theLabels, E[] theChoices, float theUIOrder)
theName
- StringtheDescription
- StringtheLabels
- String[]theChoices
- E[]theUIOrder
- floatpublic EnumeratedProperty(java.lang.String theName, java.lang.String theDescription, java.lang.String[] theLabels, E[] theChoices, float theUIOrder, int maxValues)
theName
- StringtheDescription
- StringtheLabels
- String[]theChoices
- E[]theUIOrder
- floatmaxValues
- intMethod Detail |
---|
public java.lang.Class<java.lang.Object> type()
PropertyDescriptor.type()
public java.lang.String errorFor(java.lang.Object value)
errorFor
in interface PropertyDescriptor
errorFor
in class AbstractPMDProperty
value
- Object
PropertyDescriptor.errorFor(Object)
public java.lang.Object valueFrom(java.lang.String value) throws java.lang.IllegalArgumentException
value
- String
java.lang.IllegalArgumentException
PropertyDescriptor.valueFrom(String)
public java.lang.String asDelimitedString(java.lang.Object value)
asDelimitedString
in interface PropertyDescriptor
asDelimitedString
in class AbstractPMDProperty
value
- Object
PropertyDescriptor.asDelimitedString(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |