Package org.geotools.measure
Class Measure
-
- All Implemented Interfaces:
Serializable
public final class Measure extends Number
A scalar with an unit.- Since:
- 2.1
- Author:
- Martin Desruisseaux (PMO, IRD)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Measure(double value, Unit<?> unit)Creates a new measure with the specified value and unit.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytebyteValue()Returns the scalar value.doubledoubleValue()Returns the scalar value.booleanequals(Object object)Compares this measure with the specified object for equality.floatfloatValue()Returns the scalar value.Unit<?>getUnit()Returns the unit.inthashCode()Returns a hash code value for this measure.intintValue()Returns the scalar value.longlongValue()Returns the scalar value.shortshortValue()Returns the scalar value.StringtoString()Returns a string representation of this measure.
-
-
-
Method Detail
-
doubleValue
public double doubleValue()
Returns the scalar value.- Specified by:
doubleValuein classNumber
-
floatValue
public float floatValue()
Returns the scalar value.- Specified by:
floatValuein classNumber
-
shortValue
public short shortValue()
Returns the scalar value.- Overrides:
shortValuein classNumber
-
getUnit
public Unit<?> getUnit()
Returns the unit.- Returns:
- The unit of measurement.
-
hashCode
public int hashCode()
Returns a hash code value for this measure.
-
equals
public boolean equals(Object object)
Compares this measure with the specified object for equality.
-
-