Package org.hl7.fhir.dstu2.model
Class Quantity
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.Element
-
- org.hl7.fhir.dstu2.model.Type
-
- org.hl7.fhir.dstu2.model.Quantity
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,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.ICompositeType
public class Quantity extends Type implements org.hl7.fhir.instance.model.api.ICompositeType
A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuantity.QuantityComparatorstatic classQuantity.QuantityComparatorEnumFactory
-
Field Summary
Fields Modifier and Type Field Description protected CodeTypecodeA computer processable form of the unit in some unit representation system.protected Enumeration<Quantity.QuantityComparator>comparatorHow the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g.protected UriTypesystemThe identification of the system that provides the coded form of the unit.protected StringTypeunitA human-readable form of the unit.protected DecimalTypevalueThe value of the measured amount.
-
Constructor Summary
Constructors Constructor Description Quantity()
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2.model.Element
addExtension, addExtension, copyValues, getExtension, getExtensionsByUrl, getExtensionString, getId, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, setId, setIdElement
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
value
protected DecimalType value
The value of the measured amount. The value includes an implicit precision in the presentation of the value.
-
comparator
protected Enumeration<Quantity.QuantityComparator> comparator
How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.
-
unit
protected StringType unit
A human-readable form of the unit.
-
system
protected UriType system
The identification of the system that provides the coded form of the unit.
-
-
Constructor Detail
-
Quantity
public Quantity()
-
-
Method Detail
-
getValueElement
public DecimalType getValueElement()
- Returns:
value(The value of the measured amount. The value includes an implicit precision in the presentation of the value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
-
hasValueElement
public boolean hasValueElement()
-
hasValue
public boolean hasValue()
-
setValueElement
public Quantity setValueElement(DecimalType value)
- Parameters:
value-value(The value of the measured amount. The value includes an implicit precision in the presentation of the value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
-
getValue
public BigDecimal getValue()
- Returns:
- The value of the measured amount. The value includes an implicit precision in the presentation of the value.
-
setValue
public Quantity setValue(BigDecimal value)
- Parameters:
value- The value of the measured amount. The value includes an implicit precision in the presentation of the value.
-
getComparatorElement
public Enumeration<Quantity.QuantityComparator> getComparatorElement()
- Returns:
comparator(How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.). This is the underlying object with id, value and extensions. The accessor "getComparator" gives direct access to the value
-
hasComparatorElement
public boolean hasComparatorElement()
-
hasComparator
public boolean hasComparator()
-
setComparatorElement
public Quantity setComparatorElement(Enumeration<Quantity.QuantityComparator> value)
- Parameters:
value-comparator(How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.). This is the underlying object with id, value and extensions. The accessor "getComparator" gives direct access to the value
-
getComparator
public Quantity.QuantityComparator getComparator()
- Returns:
- How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.
-
setComparator
public Quantity setComparator(Quantity.QuantityComparator value)
- Parameters:
value- How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.
-
getUnitElement
public StringType getUnitElement()
- Returns:
unit(A human-readable form of the unit.). This is the underlying object with id, value and extensions. The accessor "getUnit" gives direct access to the value
-
hasUnitElement
public boolean hasUnitElement()
-
hasUnit
public boolean hasUnit()
-
setUnitElement
public Quantity setUnitElement(StringType value)
- Parameters:
value-unit(A human-readable form of the unit.). This is the underlying object with id, value and extensions. The accessor "getUnit" gives direct access to the value
-
setUnit
public Quantity setUnit(String value)
- Parameters:
value- A human-readable form of the unit.
-
getSystemElement
public UriType getSystemElement()
- Returns:
system(The identification of the system that provides the coded form of the unit.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
-
hasSystemElement
public boolean hasSystemElement()
-
hasSystem
public boolean hasSystem()
-
setSystemElement
public Quantity setSystemElement(UriType value)
- Parameters:
value-system(The identification of the system that provides the coded form of the unit.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
-
getSystem
public String getSystem()
- Returns:
- The identification of the system that provides the coded form of the unit.
-
setSystem
public Quantity setSystem(String value)
- Parameters:
value- The identification of the system that provides the coded form of the unit.
-
getCodeElement
public CodeType getCodeElement()
- Returns:
code(A computer processable form of the unit in some unit representation system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
-
hasCodeElement
public boolean hasCodeElement()
-
hasCode
public boolean hasCode()
-
setCodeElement
public Quantity setCodeElement(CodeType value)
- Parameters:
value-code(A computer processable form of the unit in some unit representation system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
-
getCode
public String getCode()
- Returns:
- A computer processable form of the unit in some unit representation system.
-
setCode
public Quantity setCode(String value)
- Parameters:
value- A computer processable form of the unit in some unit representation system.
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classElement
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classElement- Throws:
org.hl7.fhir.exceptions.FHIRException
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classElement
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classElement
-
-