
Package org.hl7.fhir.r5.model
Class Enumeration<T extends Enum<?>>
java.lang.Object
org.hl7.fhir.r5.model.Base
org.hl7.fhir.r5.model.Element
org.hl7.fhir.r5.model.DataType
org.hl7.fhir.r5.model.PrimitiveType<T>
org.hl7.fhir.r5.model.Enumeration<T>
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Externalizable,Serializable,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseDatatype,org.hl7.fhir.instance.model.api.IBaseElement,org.hl7.fhir.instance.model.api.IBaseEnumeration<T>,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IPrimitiveType<T>,ICoding
public class Enumeration<T extends Enum<?>>
extends PrimitiveType<T>
implements org.hl7.fhir.instance.model.api.IBaseEnumeration<T>, ICoding
Primitive type "code" in FHIR, where the code is tied to an enumerated list of possible values
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r5.model.Base
Base.ProfileSource, Base.ValidationInfo, Base.ValidationMode, Base.ValidationReason -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.This no-arg constructor is provided for serialization only - Do not useEnumeration(EnumFactory<T> theEnumFactory) ConstructorEnumeration(EnumFactory<T> theEnumFactory, String theValue) ConstructorEnumeration(EnumFactory<T> theEnumFactory, CodeType source) ConstructorEnumeration(EnumFactory<T> theEnumFactory, T theValue) ConstructorEnumeration(EnumFactory<T> theEnumFactory, T theValue, Element source) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncopy()protected StringSubclasses must override to convert a "coerced" value into an encoded one.fhirType()getCode()Provides the enum factory which binds this enumeration to a specific ValueSetbooleanhasCode()booleanbooleanbooleanprotected TSubclasses must override to convert an encoded representation of this datatype into a "coerced" onevoidreadExternal(ObjectInput theIn) booleanbooleantoSystem()voidwriteExternal(ObjectOutput theOut) Methods inherited from class org.hl7.fhir.r5.model.PrimitiveType
asStringValue, canHavePrimitiveValue, equalsDeep, equalsShallow, forceStringValue, fpValue, fromStringValue, getProperty, getTypesForProperty, getValue, getValueAsString, hashCode, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, makeProperty, matches, primitiveValue, removeChild, setProperty, setProperty, setValue, setValueAsString, toString, typedCopy, updateStringValueMethods inherited from class org.hl7.fhir.r5.model.DataType
copyValues, getTranslation, isTranslatableMethods inherited from class org.hl7.fhir.r5.model.Element
addChild, addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, getExtension, getExtensionByUrl, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionsByUrl, getExtensionString, getExtensionString, getExtensionValue, getFHIRPublicationVersion, getId, getIdBase, getIdElement, getNamedProperty, getStandardsStatus, hasExtension, hasExtension, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement, setStandardsStatusMethods inherited from class org.hl7.fhir.r5.model.Base
addDefinition, addFormatCommentsPost, addFormatCommentsPre, addValidationMessage, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyFormatComments, copyUserData, copyValues, dateTimeValue, equals, executeFunction, getChildByName, getChildValueByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getValidationInfo, getValidationMessages, getXhtml, hasFormatComment, hasFormatCommentPost, hasFormatCommentPre, hasType, hasUserData, hasValidated, hasValidationInfo, hasValidationMessages, isBooleanPrimitive, isCopyUserData, isDateTime, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setCopyUserData, setUserData, setUserDataINN, setXhtmlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, isEmpty, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
addExtension, getExtension, hasExtensionMethods inherited from interface org.hl7.fhir.instance.model.api.IPrimitiveType
getValue, getValueAsString, hasValue, setValue, setValueAsString
-
Constructor Details
-
Enumeration
Deprecated.This no-arg constructor is provided for serialization only - Do not useConstructor -
Enumeration
Constructor -
Enumeration
Constructor -
Enumeration
Constructor -
Enumeration
Constructor -
Enumeration
Constructor
-
-
Method Details
-
copy
- Specified by:
copyin classPrimitiveType<T extends Enum<?>>
-
encode
Description copied from class:PrimitiveTypeSubclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encodein classPrimitiveType<T extends Enum<?>>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
fhirType
-
getEnumFactory
Provides the enum factory which binds this enumeration to a specific ValueSet -
parse
Description copied from class:PrimitiveTypeSubclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parsein classPrimitiveType<T extends Enum<?>>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classPrimitiveType<T extends Enum<?>>- Throws:
IOExceptionClassNotFoundException
-
toSystem
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classPrimitiveType<T extends Enum<?>>- Throws:
IOException
-
getSystem
-
hasSystem
-
getVersion
- Specified by:
getVersionin interfaceICoding
-
hasVersion
- Specified by:
hasVersionin interfaceICoding
-
supportsVersion
- Specified by:
supportsVersionin interfaceICoding
-
getCode
-
hasCode
-
getDisplay
- Specified by:
getDisplayin interfaceICoding
-
hasDisplay
- Specified by:
hasDisplayin interfaceICoding
-
supportsDisplay
- Specified by:
supportsDisplayin interfaceICoding
-
getCodeType
-