Class EnumeratedPropertyModule<E>


  • public class EnumeratedPropertyModule<E>
    extends java.lang.Object
    Factorises common functionality for enumerated properties.
    Author:
    Clément Fournier
    • Constructor Detail

      • EnumeratedPropertyModule

        public EnumeratedPropertyModule​(java.util.Map<java.lang.String,​E> choicesByLabel,
                                        java.lang.Class<E> valueType)
    • 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)