Package org.hl7.fhir.r4.model
Class Enumeration<T extends Enum<?>>
java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.Element
org.hl7.fhir.r4.model.Type
org.hl7.fhir.r4.model.PrimitiveType<T>
org.hl7.fhir.r4.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:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDeprecated.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, T theValue) ConstructorEnumeration
(EnumFactory<T> theEnumFactory, T theValue, Element source) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncopy()
protected String
Subclasses must override to convert a "coerced" value into an encoded one.fhirType()
getCode()
Provides the enum factory which binds this enumeration to a specific ValueSetboolean
hasCode()
boolean
boolean
boolean
protected T
Subclasses must override to convert an encoded representation of this datatype into a "coerced" onevoid
readExternal
(ObjectInput theIn) boolean
boolean
toSystem()
void
writeExternal
(ObjectOutput theOut) Methods inherited from class org.hl7.fhir.r4.model.PrimitiveType
asStringValue, equalsDeep, equalsShallow, forceStringValue, fpValue, fromStringValue, getProperty, getTypesForProperty, getValue, getValueAsString, hashCode, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, makeProperty, primitiveValue, removeChild, setProperty, setProperty, setValue, setValueAsString, toString, typedCopy, updateStringValue
Methods inherited from class org.hl7.fhir.r4.model.Element
addChild, addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, hasExtension, hasExtension, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setUserData, setUserDataINN
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, isEmpty, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
addExtension, getExtension, hasExtension
Methods 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
-
-
Method Details
-
copy
- Specified by:
copy
in classPrimitiveType<T extends Enum<?>>
-
encode
Description copied from class:PrimitiveType
Subclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encode
in 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:PrimitiveType
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parse
in 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:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classPrimitiveType<T extends Enum<?>>
- Throws:
IOException
ClassNotFoundException
-
toSystem
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classPrimitiveType<T extends Enum<?>>
- Throws:
IOException
-
getSystem
-
hasSystem
-
getVersion
- Specified by:
getVersion
in interfaceICoding
-
hasVersion
- Specified by:
hasVersion
in interfaceICoding
-
supportsVersion
- Specified by:
supportsVersion
in interfaceICoding
-
getCode
-
hasCode
-
getDisplay
- Specified by:
getDisplay
in interfaceICoding
-
hasDisplay
- Specified by:
hasDisplay
in interfaceICoding
-
supportsDisplay
- Specified by:
supportsDisplay
in interfaceICoding
-