Interface IBaseEnumFactory<T extends Enum<?>>

All Superinterfaces:
Serializable

public interface IBaseEnumFactory<T extends Enum<?>> extends Serializable
  • Method Summary

    Modifier and Type
    Method
    Description
    fromCode(String codeString)
    Read an enumeration value from the string that represents it on the XML or JSON
    toCode(T code)
    Get the XML/JSON representation for an enumerated value
    default String
    toSystem(T theValue)
    Get the system for a given enum value
  • Method Details

    • fromCode

      Read an enumeration value from the string that represents it on the XML or JSON
      Parameters:
      codeString - the value found in the XML or JSON
      Returns:
      the enumeration value
      Throws:
      IllegalArgumentException - is the value is not known
    • toCode

      String toCode(T code)
      Get the XML/JSON representation for an enumerated value
      Parameters:
      code - - the enumeration value
      Returns:
      the XML/JSON representation
    • toSystem

      default String toSystem(T theValue)
      Get the system for a given enum value