public class QuantityValue extends Object implements Value<BigDecimal>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
serial number
|
private String |
unit
Unit of measure
|
private BigDecimal |
value
Measurement value
|
Constructor and Description |
---|
QuantityValue(BigDecimal value)
constructor
|
QuantityValue(BigDecimal value,
String unit)
constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getUnit()
Get the unit of measure
|
BigDecimal |
getValue()
Get the measurement value
|
boolean |
isSetUnit()
Check whether the unit of measure is set
|
boolean |
isSetValue()
Check whether the value is set
|
void |
setUnit(String unit)
Set the unit of measure
|
void |
setValue(BigDecimal value)
Set the measurment value
|
String |
toString() |
private static final long serialVersionUID
private BigDecimal value
private String unit
public QuantityValue(BigDecimal value)
value
- Measurement valuepublic QuantityValue(BigDecimal value, String unit)
value
- Measurement valueunit
- Unit of measurepublic void setValue(BigDecimal value)
Value
setValue
in interface Value<BigDecimal>
value
- Value to setpublic BigDecimal getValue()
Value
getValue
in interface Value<BigDecimal>
public void setUnit(String unit)
Value
setUnit
in interface Value<BigDecimal>
unit
- Unit of measurepublic String getUnit()
Value
getUnit
in interface Value<BigDecimal>
public boolean isSetValue()
Value
isSetValue
in interface Value<BigDecimal>
true
, if value is setpublic boolean isSetUnit()
Value
isSetUnit
in interface Value<BigDecimal>
true
, if unit of measure is setCopyright © 2012-2014 52north.org. All Rights Reserved.