Package org.n52.shetland.ogc.om.values
Class QuantityValue
-
- All Implemented Interfaces:
Comparable<QuantityValue>,Copyable<SweAbstractDataComponent>,HasDefaultEncoding<SweAbstractDataComponent>,ComparableValue<BigDecimal,QuantityValue>,Value<BigDecimal>,Value<BigDecimal,SweAbstractSimpleType<BigDecimal>>,SweQuality
public class QuantityValue extends SweQuantity implements ComparableValue<BigDecimal,QuantityValue>
Quantity measurement representation for observation- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description QuantityValue()cQuantityValue(Double value)constructorQuantityValue(Double value, String unit)constructorQuantityValue(Double value, UoM unit)constructorQuantityValue(BigDecimal value)constructorQuantityValue(BigDecimal value, String unit)constructorQuantityValue(BigDecimal value, UoM unit)constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X,E extends Exception>
Xaccept(ValueVisitor<X,E> visitor)intcompareTo(QuantityValue o)StringgetUnit()Get the unit of measureUoMgetUnitObject()Get the unit of measure objectbooleanisSetUnit()Check whether the unit of measure is setvoidsetUnit(String unit)Set the unit of measureQuantityValuesetUnit(UoM unit)Set the unit of measure objectQuantityValuesetValue(BigDecimal value)Set valueStringtoString()-
Methods inherited from class org.n52.shetland.ogc.swe.simpleType.SweQuantity
accept, accept, copy, equals, getAxisID, getConstraint, getDataComponentType, getStringValue, getValue, getValueAsDouble, hashCode, isSetAxisID, isSetContstraint, isSetValue, setAxisID, setConstraint, setConstraint, setStringValue, setUom, setValue
-
Methods inherited from class org.n52.shetland.ogc.swe.simpleType.SweAbstractUomType
copyValueTo, getUom, getUomObject, isSetUom, setUom
-
Methods inherited from class org.n52.shetland.ogc.swe.simpleType.SweAbstractSimpleType
copyQuality, getQuality, isSetQuality, setQuality
-
Methods inherited from class org.n52.shetland.ogc.swe.SweAbstractDataComponent
addName, addName, addName, getDefaultElementEncoding, getDefinition, getDescription, getIdentifier, getLabel, getName, getNames, getXml, isSetDefinition, isSetDescription, isSetIdentifier, isSetLabel, isSetName, isSetNames, isSetXml, setDefaultElementEncoding, setDefinition, setDescription, setIdentifier, setLabel, setName, setName, setName, setXml
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.n52.shetland.ogc.HasDefaultEncoding
isSetDefaultElementEncoding
-
Methods inherited from interface org.n52.shetland.ogc.om.values.Value
getValue, isSetValue
-
-
-
-
Constructor Detail
-
QuantityValue
public QuantityValue()
c
-
QuantityValue
public QuantityValue(BigDecimal value)
constructor- Parameters:
value- Measurement value
-
QuantityValue
public QuantityValue(BigDecimal value, String unit)
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
QuantityValue
public QuantityValue(BigDecimal value, UoM unit)
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
QuantityValue
public QuantityValue(Double value)
constructor- Parameters:
value- Measurement value
-
QuantityValue
public QuantityValue(Double value, String unit)
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
-
Method Detail
-
setValue
public QuantityValue setValue(BigDecimal value)
Description copied from interface:ValueSet value- Specified by:
setValuein interfaceValue<BigDecimal>- Specified by:
setValuein interfaceValue<BigDecimal,SweAbstractSimpleType<BigDecimal>>- Overrides:
setValuein classSweQuantity- Parameters:
value- value to set- Returns:
- this
-
setUnit
public void setUnit(String unit)
Description copied from interface:ValueSet the unit of measure- Specified by:
setUnitin interfaceValue<BigDecimal>- Parameters:
unit- Unit of measure
-
setUnit
public QuantityValue setUnit(UoM unit)
Description copied from interface:ValueSet the unit of measure object- Specified by:
setUnitin interfaceValue<BigDecimal>- Parameters:
unit- Unit of measure
-
getUnit
public String getUnit()
Description copied from interface:ValueGet the unit of measure- Specified by:
getUnitin interfaceValue<BigDecimal>- Returns:
- Unit of measure
-
getUnitObject
public UoM getUnitObject()
Description copied from interface:ValueGet the unit of measure object- Specified by:
getUnitObjectin interfaceValue<BigDecimal>- Returns:
- Unit of measure
-
isSetUnit
public boolean isSetUnit()
Description copied from interface:ValueCheck whether the unit of measure is set- Specified by:
isSetUnitin interfaceValue<BigDecimal>- Returns:
true, if unit of measure is set
-
toString
public String toString()
- Overrides:
toStringin classSweAbstractUomType<BigDecimal>
-
accept
public <X,E extends Exception> X accept(ValueVisitor<X,E> visitor) throws E extends Exception
- Specified by:
acceptin interfaceValue<BigDecimal>- Throws:
E extends Exception
-
compareTo
public int compareTo(QuantityValue o)
- Specified by:
compareToin interfaceComparable<QuantityValue>
-
-