javax.measure
Interface Measurable<Q extends Quantity>

All Superinterfaces:
Comparable<Measurable<Q>>
All Known Implementing Classes:
FloatAmpere, FloatBit, FloatCandela, FloatCelsius, FloatCoulomb, FloatCubicMeter, FloatFarad, FloatGram, FloatHenry, FloatHertz, FloatJoule, FloatKelvin, FloatKilogram, FloatLumen, FloatLux, com.sentilla.measure.FloatMeasure, FloatMeter, FloatMeterPerSecond, FloatMeterPerSquareSecond, FloatMole, FloatNewton, FloatOhm, FloatPascal, FloatRadian, FloatRelativeHumidity, FloatSecond, FloatSiemens, FloatSquareMeter, FloatSteradian, FloatTesla, FloatVolt, FloatWatt, FloatWeber, Measure

public interface Measurable<Q extends Quantity>
extends Comparable<Measurable<Q>>

This interface represents the measurable, countable, or comparable property or aspect of a thing.

Version:
4.0, February 25, 2007

Method Summary
 double doubleValue(Unit<Q> unit)
          Returns the estimated value of this measurable quantity stated in the specified unit as a double.
 long longValue(Unit<Q> unit)
          Returns the estimated value of this quantity stated in the specified unit as a long.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

doubleValue

double doubleValue(Unit<Q> unit)
Returns the estimated value of this measurable quantity stated in the specified unit as a double.

Parameters:
unit - the unit in which the measurement value is stated.
Returns:
the numeric value after conversion to type double.

longValue

long longValue(Unit<Q> unit)
               throws ArithmeticException
Returns the estimated value of this quantity stated in the specified unit as a long.

Parameters:
unit - the unit in which the measurement value is stated.
Returns:
the numeric value after conversion to type long.
Throws:
ArithmeticException - if this quantity cannot be represented as a long number in the specified unit.


Copyright © 2007 Sentilla Corporation. All Rights Reserved.