JScience v3.1

javax.quantities
Interface Quantity<Q extends Quantity>

All Known Subinterfaces:
Acceleration, AmountOfSubstance, Angle, AngularAcceleration, AngularVelocity, Area, CatalyticActivity, DataAmount, DataRate, Dimensionless, Duration, DynamicViscosity, ElectricCapacitance, ElectricCharge, ElectricConductance, ElectricCurrent, ElectricInductance, ElectricPotential, ElectricResistance, Energy, Force, Frequency, Illuminance, KinematicViscosity, Length, LuminousFlux, LuminousIntensity, MagneticFlux, MagneticFluxDensity, Mass, MassFlowRate, Money, Power, Pressure, RadiationDoseAbsorbed, RadiationDoseEffective, RadioactiveActivity, SolidAngle, Temperature, Torque, Velocity, Volume, VolumetricDensity, VolumetricFlowRate
All Known Implementing Classes:
Altitude, Height, Measure, Scalar, Time

public interface Quantity<Q extends Quantity>

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

Version:
1.0, January 14, 2006
Author:
Jean-Marie Dautelle

Method Summary
 double doubleValue(Unit<Q> unit)
          Returns the estimated value of this 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.
 

Method Detail

doubleValue

double doubleValue(Unit<Q> unit)
Returns the estimated value of this 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 java.lang.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:
java.lang.ArithmeticException - if this quantity cannot be represented as a long number in the specified unit.

JScience v3.1

Copyright © 2006 JScience.