org.geotools.measure
Class Measure

java.lang.Object
  extended byjava.lang.Number
      extended byorg.geotools.measure.Measure
All Implemented Interfaces:
java.io.Serializable

public final class Measure
extends java.lang.Number

A scalar with an unit.

Since:
2.1
Version:
$Id: Measure.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Constructor Summary
Measure(double value, javax.units.Unit unit)
          Creates a new measure with the specified value and unit.
 
Method Summary
 byte byteValue()
          Returns the scalar value.
 double doubleValue()
          Returns the scalar value.
 boolean equals(java.lang.Object object)
          Compares this measure with the specified object for equality.
 float floatValue()
          Returns the scalar value.
 javax.units.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.
 java.lang.String toString()
          Returns a string representation of this measure.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Measure

public Measure(double value,
               javax.units.Unit unit)
Creates a new measure with the specified value and unit.

Method Detail

doubleValue

public double doubleValue()
Returns the scalar value.


floatValue

public float floatValue()
Returns the scalar value.


longValue

public long longValue()
Returns the scalar value.


intValue

public int intValue()
Returns the scalar value.


shortValue

public short shortValue()
Returns the scalar value.


byteValue

public byte byteValue()
Returns the scalar value.


getUnit

public javax.units.Unit getUnit()
Returns the unit.


hashCode

public int hashCode()
Returns a hash code value for this measure.


equals

public boolean equals(java.lang.Object object)
Compares this measure with the specified object for equality.


toString

public java.lang.String toString()
Returns a string representation of this measure.



Copyright © GeoTools. All Rights Reserved.