
Package ca.uhn.fhir.model.api
Class BasePrimitive<T>
java.lang.Object
ca.uhn.fhir.model.api.BaseElement
ca.uhn.fhir.model.api.BaseIdentifiableElement
ca.uhn.fhir.model.api.BasePrimitive<T>
- All Implemented Interfaces:
IDatatype,IElement,IIdentifiableElement,IPrimitiveDatatype<T>,ISupportsUndeclaredExtensions,Externalizable,Serializable,IBase,IBaseDatatype,IPrimitiveType<T>
- Direct Known Subclasses:
Base64BinaryDt,BaseDateTimeDt,BooleanDt,CodeDt,DecimalDt,IntegerDt,StringDt,UriDt,XhtmlDt
public abstract class BasePrimitive<T>
extends BaseIdentifiableElement
implements IPrimitiveDatatype<T>, Externalizable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringSubclasses must override to convert a "coerced" value into an encoded one.booleangetValue()inthashCode()booleanhasValue()booleanisEmpty()protected abstract TSubclasses must override to convert an encoded representation of this datatype into a "coerced" onevoidreadExternal(ObjectInput theIn) voidsetValueAsString(String theValue) toString()protected voidvoidwriteExternal(ObjectOutput theOut) Methods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setIdMethods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, isBaseEmpty, setUserDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
Constructor Details
-
BasePrimitive
public BasePrimitive()
-
-
Method Details
-
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
-
equals
-
getValue
- Specified by:
getValuein interfaceIPrimitiveDatatype<T>- Specified by:
getValuein interfaceIPrimitiveType<T>
-
getValueAsString
- Specified by:
getValueAsStringin interfaceIPrimitiveDatatype<T>- Specified by:
getValueAsStringin interfaceIPrimitiveType<T>- Throws:
DataFormatException
-
hashCode
-
isEmpty
-
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
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
setValue
- Specified by:
setValuein interfaceIPrimitiveDatatype<T>- Specified by:
setValuein interfaceIPrimitiveType<T>- Throws:
DataFormatException
-
setValueAsString
- Specified by:
setValueAsStringin interfaceIPrimitiveDatatype<T>- Specified by:
setValueAsStringin interfaceIPrimitiveType<T>- Throws:
DataFormatException
-
toString
-
updateStringValue
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
hasValue
- Specified by:
hasValuein interfaceIPrimitiveType<T>
-