public final class Measure extends Number
Constructor and Description |
---|
Measure(double value,
Unit<?> unit)
Creates a new measure with the specified value and unit.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Returns the scalar value.
|
double |
doubleValue()
Returns the scalar value.
|
boolean |
equals(Object object)
Compares this measure with the specified object for equality.
|
float |
floatValue()
Returns the scalar value.
|
Unit<?> |
getUnit()
Returns the unit.
|
int |
hashCode()
Returns a hash code value for this measure.
|
int |
intValue()
Returns the scalar value.
|
long |
longValue()
Returns the scalar value.
|
short |
shortValue()
Returns the scalar value.
|
String |
toString()
Returns a string representation of this measure.
|
public Measure(double value, Unit<?> unit)
value
- The value.unit
- The unit of measurement for the given value.public double doubleValue()
doubleValue
in class Number
public float floatValue()
floatValue
in class Number
public short shortValue()
shortValue
in class Number
public Unit<?> getUnit()
public int hashCode()
public boolean equals(Object object)
Copyright © 1996–2019 Geotools. All rights reserved.