Package org.hl7.fhir.instance.model.api
Interface IBaseEnumFactory<T extends Enum<?>>
-
- All Superinterfaces:
Serializable
public interface IBaseEnumFactory<T extends Enum<?>> extends Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TfromCode(String codeString)Read an enumeration value from the string that represents it on the XML or JSONStringtoCode(T code)Get the XML/JSON representation for an enumerated valuedefault StringtoSystem(T theValue)Get the system for a given enum 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- 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
-
-