Interface EnumFactory<T extends Enum<?>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T fromCode​(String codeString)
      Read an enumeration value from the string that represents it on the XML or JSON
      String toCode​(T code)
      Get the XML/JSON representation for an enumerated value
      String toSystem​(T code)
      Get the XML/JSON representation for an enumerated value
    • Method Detail

      • fromCode

        T fromCode​(String codeString)
            throws IllegalArgumentException
        Read an enumeration value from the string that represents it on the XML or JSON
        Specified by:
        fromCode in interface org.hl7.fhir.instance.model.api.IBaseEnumFactory<T extends Enum<?>>
        Parameters:
        codeString - the value found in the XML or JSON
        Returns:
        the enumeration value
        Throws:
        Exception - is the value is not known
        IllegalArgumentException
      • toCode

        String toCode​(T code)
        Get the XML/JSON representation for an enumerated value
        Specified by:
        toCode in interface org.hl7.fhir.instance.model.api.IBaseEnumFactory<T extends Enum<?>>
        Parameters:
        code - - the enumeration value
        Returns:
        the XML/JSON representation
      • toSystem

        String toSystem​(T code)
        Get the XML/JSON representation for an enumerated value
        Specified by:
        toSystem in interface org.hl7.fhir.instance.model.api.IBaseEnumFactory<T extends Enum<?>>
        Parameters:
        code - - the enumeration value
        Returns:
        the XML/JSON representation