Package org.hl7.fhir.r4.model
Class PrimitiveType<T>
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>
- 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.IBaseHasExtensions
,org.hl7.fhir.instance.model.api.IPrimitiveType<T>
- Direct Known Subclasses:
Base64BinaryType
,BaseDateTimeType
,BooleanType
,DecimalType
,Enumeration
,IntegerType
,StringType
,TimeType
,UriType
public abstract class PrimitiveType<T>
extends Type
implements org.hl7.fhir.instance.model.api.IPrimitiveType<T>, org.hl7.fhir.instance.model.api.IBaseHasExtensions, ca.uhn.fhir.model.api.IElement, Externalizable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Type
copy()
protected abstract String
Subclasses must override to convert a "coerced" value into an encoded one.boolean
equalsDeep
(Base obj) boolean
equalsShallow
(Base obj) protected void
forceStringValue
(String value) fpValue()
void
fromStringValue
(String theValue) Base[]
getProperty
(int hash, String name, boolean checkValid) String[]
getTypesForProperty
(int hash, String name) getValue()
int
hashCode()
boolean
boolean
hasValue()
boolean
isEmpty()
boolean
makeProperty
(int hash, String name) protected abstract T
Subclasses must override to convert an encoded representation of this datatype into a "coerced" onevoid
readExternal
(ObjectInput theIn) void
removeChild
(String name, Base value) setProperty
(int hash, String name, Base value) setProperty
(String name, Base value) void
setValueAsString
(String theValue) toString()
protected Type
protected void
void
writeExternal
(ObjectOutput theOut) Methods inherited from class org.hl7.fhir.r4.model.Element
addChild, addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, fhirType, 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
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, 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
-
Constructor Details
-
PrimitiveType
public PrimitiveType()
-
-
Method Details
-
asStringValue
-
copy
-
encode
Subclasses must override to convert a "coerced" value into an encoded one.- Parameters:
theValue
- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
equalsDeep
- Overrides:
equalsDeep
in classElement
-
equalsShallow
- Overrides:
equalsShallow
in classElement
-
fromStringValue
-
getValue
- Specified by:
getValue
in interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<T>
-
getValueAsString
- Specified by:
getValueAsString
in interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<T>
-
hashCode
-
hasValue
- Specified by:
hasValue
in interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<T>
-
isEmpty
-
isPrimitive
- Overrides:
isPrimitive
in classBase
-
parse
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one- Parameters:
theValue
- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
primitiveValue
- Overrides:
primitiveValue
in classBase
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
setValue
- Specified by:
setValue
in interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<T>
-
setValueAsString
- Specified by:
setValueAsString
in interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<T>
-
toString
-
typedCopy
-
updateStringValue
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
setProperty
public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
setProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
- Overrides:
setProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
removeChild
- Overrides:
removeChild
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
- Overrides:
makeProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getTypesForProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
forceStringValue
-
hasPrimitiveValue
- Overrides:
hasPrimitiveValue
in classBase
-
fpValue
-