Package org.hl7.fhir.dstu3.model
Class BooleanType
java.lang.Object
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement
,Externalizable
,Serializable
,org.hl7.fhir.instance.model.api.IBase
,org.hl7.fhir.instance.model.api.IBaseBooleanDatatype
,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<Boolean>
public class BooleanType
extends PrimitiveType<Boolean>
implements org.hl7.fhir.instance.model.api.IBaseBooleanDatatype
Primitive type "boolean" in FHIR "true" or "false"
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBooleanType
(boolean theBoolean) BooleanType
(Boolean theBoolean) BooleanType
(String value) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of this type as a primitive boolean.copy()
protected String
Subclasses must override to convert a "coerced" value into an encoded one.fhirType()
protected Boolean
Subclasses must override to convert an encoded representation of this datatype into a "coerced" oneMethods inherited from class org.hl7.fhir.dstu3.model.PrimitiveType
asStringValue, equalsDeep, equalsShallow, fromStringValue, getProperty, getValue, getValueAsString, hashCode, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, primitiveValue, readExternal, setProperty, setProperty, setValue, setValueAsString, toString, typedCopy, updateStringValue, writeExternal
Methods inherited from class org.hl7.fhir.dstu3.model.Element
addChild, addExtension, addExtension, addExtension, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, getTypesForProperty, hasExtension, hasExtension, hasId, hasIdElement, listChildren, makeProperty, setExtension, setId, setIdBase, setIdElement
Methods inherited from class org.hl7.fhir.dstu3.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, 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
-
BooleanType
public BooleanType() -
BooleanType
-
BooleanType
-
BooleanType
-
-
Method Details
-
booleanValue
Returns the value of this type as a primitive boolean.- Returns:
- Returns the value of this type as a primitive boolean.
- Throws:
NullPointerException
- If the value is not set
-
copy
- Specified by:
copy
in classPrimitiveType<Boolean>
-
encode
Description copied from class:PrimitiveType
Subclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encode
in classPrimitiveType<Boolean>
- Parameters:
theValue
- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
fhirType
-
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<Boolean>
- Parameters:
theValue
- Will not be null- Returns:
- May return null if the value does not correspond to anything
-