Package ca.uhn.fhir.rest.param
Class QuantityParam
- All Implemented Interfaces:
IQueryParameterType
,Serializable
public class QuantityParam
extends BaseParamWithPrefix<QuantityParam>
implements IQueryParameterType
- See Also:
-
Field Summary
Fields inherited from class ca.uhn.fhir.rest.param.BaseParamWithPrefix
MSG_PREFIX_INVALID_FORMAT
-
Constructor Summary
ConstructorDescriptionConstructorQuantityParam
(long theQuantity) ConstructorQuantityParam
(ParamPrefixEnum thePrefix, double theValue, String theSystem, String theUnits) ConstructorQuantityParam
(ParamPrefixEnum thePrefix, long theValue, String theSystem, String theUnits) ConstructorQuantityParam
(ParamPrefixEnum thePrefix, BigDecimal theValue, String theSystem, String theUnits) ConstructorQuantityParam
(String theQuantity) ConstructorQuantityParam
(String theQuantity, String theSystem, String theUnits) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the system, or null if none was providedDeprecated.getUnits()
getValue()
Returns the quantity/value, or null if none was providedsetSystem
(IPrimitiveType<String> theSystem) setValue
(double theValue) setValue
(long theValue) setValue
(BigDecimal theValue) setValue
(IPrimitiveType<BigDecimal> theValue) static QuantityParam
toQuantityParam
(IQueryParameterType theParam) toString()
Methods inherited from class ca.uhn.fhir.rest.param.BaseParamWithPrefix
getPrefix, setPrefix
Methods inherited from class ca.uhn.fhir.rest.param.BaseParam
getMissing, getQueryParameterQualifier, getValueAsQueryToken, isSupportsChain, setMissing, setValueAsQueryToken
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.model.api.IQueryParameterType
getMissing, getQueryParameterQualifier, getValueAsQueryToken, setMissing, setValueAsQueryToken
-
Constructor Details
-
QuantityParam
public QuantityParam()Constructor -
QuantityParam
public QuantityParam(ParamPrefixEnum thePrefix, BigDecimal theValue, String theSystem, String theUnits) Constructor- Parameters:
thePrefix
- The comparator, ornull
for an equals comparatortheValue
- A quantity valuetheSystem
- The unit systemtheUnits
- The unit code
-
QuantityParam
Constructor- Parameters:
thePrefix
- The comparator, ornull
for an equals comparatortheValue
- A quantity valuetheSystem
- The unit systemtheUnits
- The unit code
-
QuantityParam
Constructor- Parameters:
thePrefix
- The comparator, ornull
for an equals comparatortheValue
- A quantity valuetheSystem
- The unit systemtheUnits
- The unit code
-
QuantityParam
Constructor- Parameters:
theQuantity
- A quantity value (with no system or units), such as "100.0" or "gt4"
-
QuantityParam
Constructor- Parameters:
theQuantity
- A quantity value (with no system or units), such as100
-
QuantityParam
Constructor- Parameters:
theQuantity
- A quantity value (with no system or units), such as "100.0" or "<=4"theSystem
- The unit systemtheUnits
- The unit code
-
-
Method Details
-
getValueAsString
-
getSystem
Returns the system, or null if none was providedNote that prior to HAPI FHIR 1.5, this method returned a
UriDt
- Since:
- 1.5
-
getSystemAsUriDt
Deprecated.Use {getSystem()
} instead -
getUnits
-
getValue
Returns the quantity/value, or null if none was providedNote that prior to HAPI FHIR 1.5, this method returned a
DecimalDt
- Since:
- 1.5
-
setSystem
-
setSystem
-
setUnits
-
setValue
-
setValue
-
setValue
-
setValue
-
setValue
-
toString
-
toQuantityParam
-
getSystem()
} instead