Package ca.uhn.fhir.rest.param
Class QuantityParam
- java.lang.Object
-
- ca.uhn.fhir.rest.param.BaseParam
-
- ca.uhn.fhir.rest.param.BaseParamWithPrefix<QuantityParam>
-
- ca.uhn.fhir.rest.param.QuantityParam
-
- All Implemented Interfaces:
IQueryParameterType,Serializable
public class QuantityParam extends BaseParamWithPrefix<QuantityParam> implements IQueryParameterType
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QuantityParam()ConstructorQuantityParam(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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetSystem()Returns the system, or null if none was providedUriDtgetSystemAsUriDt()Deprecated.Use {getSystem()} insteadStringgetUnits()BigDecimalgetValue()Returns the quantity/value, or null if none was providedStringgetValueAsString()QuantityParamsetSystem(String theSystem)QuantityParamsetSystem(IPrimitiveType<String> theSystem)QuantityParamsetUnits(String theUnits)QuantityParamsetValue(double theValue)QuantityParamsetValue(long theValue)QuantityParamsetValue(String theValue)QuantityParamsetValue(BigDecimal theValue)QuantityParamsetValue(IPrimitiveType<BigDecimal> theValue)StringtoString()-
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 Detail
-
QuantityParam
public QuantityParam()
Constructor
-
QuantityParam
public QuantityParam(ParamPrefixEnum thePrefix, BigDecimal theValue, String theSystem, String theUnits)
Constructor- Parameters:
thePrefix- The comparator, ornullfor an equals comparatortheValue- A quantity valuetheSystem- The unit systemtheUnits- The unit code
-
QuantityParam
public QuantityParam(ParamPrefixEnum thePrefix, double theValue, String theSystem, String theUnits)
Constructor- Parameters:
thePrefix- The comparator, ornullfor an equals comparatortheValue- A quantity valuetheSystem- The unit systemtheUnits- The unit code
-
QuantityParam
public QuantityParam(ParamPrefixEnum thePrefix, long theValue, String theSystem, String theUnits)
Constructor- Parameters:
thePrefix- The comparator, ornullfor an equals comparatortheValue- A quantity valuetheSystem- The unit systemtheUnits- The unit code
-
QuantityParam
public QuantityParam(String theQuantity)
Constructor- Parameters:
theQuantity- A quantity value (with no system or units), such as "100.0" or "gt4"
-
QuantityParam
public QuantityParam(long theQuantity)
Constructor- Parameters:
theQuantity- A quantity value (with no system or units), such as100
-
QuantityParam
public QuantityParam(String theQuantity, String theSystem, String theUnits)
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 Detail
-
getValueAsString
public String getValueAsString()
-
getSystem
public String 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 public UriDt getSystemAsUriDt()
Deprecated.Use {getSystem()} instead
-
getValue
public BigDecimal 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
public QuantityParam setSystem(String theSystem)
-
setSystem
public QuantityParam setSystem(IPrimitiveType<String> theSystem)
-
setUnits
public QuantityParam setUnits(String theUnits)
-
setValue
public QuantityParam setValue(BigDecimal theValue)
-
setValue
public QuantityParam setValue(IPrimitiveType<BigDecimal> theValue)
-
setValue
public QuantityParam setValue(String theValue)
-
setValue
public QuantityParam setValue(double theValue)
-
setValue
public QuantityParam setValue(long theValue)
-
-