
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 Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getSystem()
Returns the system, or null if none was providedUriDt
getSystemAsUriDt()
Deprecated.Use {getSystem()
} insteadString
getUnits()
BigDecimal
getValue()
Returns the quantity/value, or null if none was providedString
getValueAsString()
QuantityParam
setSystem(String theSystem)
QuantityParam
setSystem(IPrimitiveType<String> theSystem)
QuantityParam
setUnits(String theUnits)
QuantityParam
setValue(double theValue)
QuantityParam
setValue(long theValue)
QuantityParam
setValue(String theValue)
QuantityParam
setValue(BigDecimal theValue)
QuantityParam
setValue(IPrimitiveType<BigDecimal> theValue)
static QuantityParam
toQuantityParam(IQueryParameterType theParam)
String
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 Detail
-
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
public QuantityParam(ParamPrefixEnum thePrefix, double 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
public QuantityParam(ParamPrefixEnum thePrefix, long 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
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)
-
toQuantityParam
public static QuantityParam toQuantityParam(IQueryParameterType theParam)
-
-