Class EnumeratedPropertyModule<E>
- java.lang.Object
-
- net.sourceforge.pmd.properties.modules.EnumeratedPropertyModule<E>
-
public class EnumeratedPropertyModule<E> extends java.lang.Object
Factorises common functionality for enumerated properties.- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description EnumeratedPropertyModule(java.util.Map<java.lang.String,E> choicesByLabel, java.lang.Class<E> valueType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkValue(E value)
E
choiceFrom(java.lang.String label)
java.lang.String
errorFor(E value)
java.util.Map<java.lang.String,E>
getChoicesByLabel()
java.util.Map<E,java.lang.String>
getLabelsByChoice()
java.lang.Class<E>
getValueType()
-
-
-
Method Detail
-
getValueType
public java.lang.Class<E> getValueType()
-
getLabelsByChoice
public java.util.Map<E,java.lang.String> getLabelsByChoice()
-
getChoicesByLabel
public java.util.Map<java.lang.String,E> getChoicesByLabel()
-
errorFor
public java.lang.String errorFor(E value)
-
choiceFrom
public E choiceFrom(java.lang.String label)
-
checkValue
public void checkValue(E value)
-
-