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
Quantity measurement representation for observation
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptioncQuantityValue(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
Modifier and TypeMethodDescription<X,E extends Exception>
Xaccept(ValueVisitor<X, E> visitor) intgetUnit()Get the unit of measureGet the unit of measure objectbooleanCheck whether the unit of measure is setvoidSet the unit of measureSet the unit of measure objectsetValue(BigDecimal value) Set valuetoString()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, setValueMethods inherited from class org.n52.shetland.ogc.swe.simpleType.SweAbstractUomType
copyValueTo, getUom, getUomObject, isSetUom, setUomMethods inherited from class org.n52.shetland.ogc.swe.simpleType.SweAbstractSimpleType
copyQuality, getQuality, isSetQuality, setQualityMethods 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, setXmlMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.n52.shetland.ogc.HasDefaultEncoding
isSetDefaultElementEncodingMethods inherited from interface org.n52.shetland.ogc.om.values.Value
getValue, isSetValue
-
Constructor Details
-
QuantityValue
public QuantityValue()c -
QuantityValue
constructor- Parameters:
value- Measurement value
-
QuantityValue
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
QuantityValue
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
QuantityValue
constructor- Parameters:
value- Measurement value
-
QuantityValue
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
QuantityValue
constructor- Parameters:
value- Measurement valueunit- Unit of measure
-
-
Method Details
-
setValue
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
Description copied from interface:ValueSet the unit of measure- Specified by:
setUnitin interfaceValue<BigDecimal>- Parameters:
unit- Unit of measure
-
setUnit
Description copied from interface:ValueSet the unit of measure object- Specified by:
setUnitin interfaceValue<BigDecimal>- Parameters:
unit- Unit of measure
-
getUnit
Description copied from interface:ValueGet the unit of measure- Specified by:
getUnitin interfaceValue<BigDecimal>- Returns:
- Unit of measure
-
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
- Overrides:
toStringin classSweAbstractUomType<BigDecimal>
-
accept
- Specified by:
acceptin interfaceValue<BigDecimal>- Throws:
E
-
compareTo
- Specified by:
compareToin interfaceComparable<QuantityValue>
-