Package javax.measure.quantity
Quantity
interface.
Only quantities defined in the BIPM - SI Brochure
are provided here. Users can create their own quantity types by extending the
Quantity
interface.
This package supports measurable quantities, which can be expressed
as (Number
, Unit
) tuples.
Those tuples are not necessarily used directly in numerically intensive code.
They are more useful as meta-data converted to the application internal representation
(for example double
primitive type with the requirement to provide values in meters)
before computation begins.
Quantity
sub-types are also used as parameterized type to characterize
generic classes and provide additional compile time check. This technique is
used extensively by the Unit
interface,
but users can apply the same approach to their own classes. In the example
below, Sensor
, MyQuantity
and Vector3D
are user-defined
classes:
// A general-purpose Sensor class used for temperature measurements:
Sensor<Temperature> sensor ...;
Temperature temp = sensor.getValue();
// A vector of velocity in a three-dimensional space.
Unit<Speed> = metrePerSecond = METRE.divide(SECOND);
Vector3D<Speed> aircraftSpeed = new Vector3D(200.0, 50.0, -0.5, metrePerSecond);
This package holds only the quantities required by the metric system.
- Since:
- 1.0
- Version:
- 2.8
- Author:
- Jean-Marie Dautelle, Werner Keil
- See Also:
- Wikipedia: International System of Units, Wikipedia: 2019 redefinition of the SI base units
-
Interface Summary Interface Description Acceleration Rate of change of velocity with respect to time.AmountOfSubstance Number of elementary entities (molecules, for example) of a substance.Angle Figure formed by two lines diverging from a common point.Area Extent of a planar region or of the surface of a solid measured in square units.CatalyticActivity Catalytic activity.Dimensionless Dimensionless quantity.ElectricCapacitance Electric capacitance.ElectricCharge Electric charge.ElectricConductance Electric conductance.ElectricCurrent Amount of electric charge flowing past a specified circuit point per unit time.ElectricInductance Electric inductance.ElectricPotential Electric potential or electromotive force.ElectricResistance Electric resistance.Energy Capacity of a physical system to do work.Force Quantity that tends to produce an acceleration of a body in the direction of its application.Frequency Number of times a specified phenomenon occurs within a specified interval.Illuminance Illuminance.Length Extent of something along its greatest dimension or the extent of space between two objects or places.LuminousFlux Luminous flux.LuminousIntensity Luminous flux density per solid angle as measured in a given direction relative to the emitting source.MagneticFlux Magnetic flux.MagneticFluxDensity Magnetic flux density.Mass Measure of the quantity of matter that a body or an object contains.Power Rate at which work is done.Pressure Force applied uniformly over a surface.RadiationDoseAbsorbed Amount of energy deposited per unit of mass.RadiationDoseEffective Effective (or "equivalent") dose of radiation received by a human or some other living organism.Radioactivity Radioactive activity.SolidAngle Angle formed by three or more planes intersecting at a common point.Speed Distance traveled divided by the time of travel.Temperature Degree of hotness or coldness of a body or an environment.Time Period of existence or persistence.Volume Amount of space occupied by a three-dimensional object or region of space.