org.unitsofmeasurement.quantity
Interface Quantity<Q extends Quantity<Q>>

Type Parameters:
Q - The type of the quantity.
All Known Subinterfaces:
Acceleration, Action, AmountOfSubstance, Angle, AngularAcceleration, AngularSpeed, AngularVelocity, Area, CatalyticActivity, Dimensionless, DynamicViscosity, ElectricCapacitance, ElectricCharge, ElectricConductance, ElectricCurrent, ElectricInductance, ElectricPermittivity, ElectricPotential, ElectricResistance, Energy, Force, Frequency, Illuminance, Information, InformationRate, IonizingRadiation, KinematicViscosity, Length, Luminance, LuminousFlux, LuminousIntensity, MagneticFieldStrength, MagneticFlux, MagneticFluxDensity, MagneticPermeability, MagnetomotiveForce, Mass, MassFlowRate, Power, Pressure, RadiationDoseAbsorbed, RadiationDoseEffective, RadioactiveActivity, Radioactivity, SolidAngle, Speed, Temperature, Time, Torque, Velocity, Volume, VolumetricDensity, VolumetricFlowRate, WaveNumber

public interface Quantity<Q extends Quantity<Q>>

Property of a phenomenon, body, or substance, where the property has a magnitude that can be expressed as a number and a unit (adapted from VIM). Mass, time, distance, heat, and angular separation are among the familiar examples of quantitative properties.

Kind of quantity, represented by sub-types, are aspect common to mutually comparable quantities (source: VIM). Sub-types are used to specify the quantitative property associated to a class through class parameterization and to provide limited compile time dimension consistency.

 Unit<Mass> pound = ...
 Quantity<Length> size = ...
 Sensor<Temperature> thermometer = ...
 Vector3D<Speed> aircraftVelocity = ...
 

Author:
Jean-Marie Dautelle, Martin Desruisseaux, Werner Keil
See Also:
Wikipedia: Physical Quantity, International Vocabulary of Metrology (VIM)

Method Summary
 Unit<Q> unit()
          Returns the unit of this quantity value.
 Number value()
          Returns the value of this quantity as a number stated in this quantity unit.
 

Method Detail

value

Number value()
Returns the value of this quantity as a number stated in this quantity unit.

Returns:
the value of this quantity (can not be null).

unit

Unit<Q> unit()
Returns the unit of this quantity value.

Returns:
the unit of this quantity (can not be null).


Copyright © 2005-2013 Units of Measurement project. All Rights Reserved.