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
| Constructor and Description |
|---|
PrimitiveType() |
| Modifier and Type | Method and Description |
|---|---|
String |
asStringValue() |
abstract Type |
copy() |
protected abstract String |
encode(T theValue)
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) |
String |
fpValue() |
void |
fromStringValue(String theValue) |
Base[] |
getProperty(int hash,
String name,
boolean checkValid) |
String[] |
getTypesForProperty(int hash,
String name) |
T |
getValue() |
String |
getValueAsString() |
int |
hashCode() |
boolean |
hasPrimitiveValue() |
boolean |
hasValue() |
boolean |
isEmpty() |
boolean |
isPrimitive() |
Base |
makeProperty(int hash,
String name) |
protected abstract T |
parse(String theValue)
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
|
String |
primitiveValue() |
void |
readExternal(ObjectInput theIn) |
Base |
setProperty(int hash,
String name,
Base value) |
Base |
setProperty(String name,
Base value) |
PrimitiveType<T> |
setValue(T theValue) |
void |
setValueAsString(String theValue) |
String |
toString() |
protected Type |
typedCopy() |
protected void |
updateStringValue() |
void |
writeExternal(ObjectOutput theOut) |
addChild, addExtension, addExtension, addExtension, copyValues, fhirType, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElementcastToAddress, 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, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setUserData, setUserDataINNclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitfhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDatapublic PrimitiveType()
public String asStringValue()
protected abstract String encode(T theValue)
theValue - Will not be nullpublic boolean equalsDeep(Base obj)
equalsDeep in class Elementpublic boolean equalsShallow(Base obj)
equalsShallow in class Elementpublic void fromStringValue(String theValue)
public T getValue()
getValue in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>public String getValueAsString()
getValueAsString in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>public boolean hasValue()
hasValue in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>public boolean isEmpty()
public boolean isPrimitive()
isPrimitive in class Baseprotected abstract T parse(String theValue)
theValue - Will not be nullpublic String primitiveValue()
primitiveValue in class Basepublic void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic PrimitiveType<T> setValue(T theValue)
setValue in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>public void setValueAsString(String theValue)
setValueAsString in interface org.hl7.fhir.instance.model.api.IPrimitiveType<T>protected void updateStringValue()
public void writeExternal(ObjectOutput theOut) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
setProperty in class Elementorg.hl7.fhir.exceptions.FHIRExceptionpublic Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
setProperty in class Elementorg.hl7.fhir.exceptions.FHIRExceptionpublic Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
makeProperty in class Elementorg.hl7.fhir.exceptions.FHIRExceptionpublic Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
getProperty in class Elementorg.hl7.fhir.exceptions.FHIRExceptionpublic String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
getTypesForProperty in class Elementorg.hl7.fhir.exceptions.FHIRExceptionprotected void forceStringValue(String value)
public boolean hasPrimitiveValue()
hasPrimitiveValue in class BaseCopyright © 2014–2021 Health Level 7. All rights reserved.