Top Description Interfaces
[default module]

Package javax.measure.quantity


[OPTIONAL] Provides quantitative properties or attributes of thing such as mass, time, distance, heat, and angular separation. Quantities of different kinds are represented by sub-types of the javax.measure.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 (java.lang.Number, javax.measure.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 javax.measure.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.

Authors
Jean-Marie Dautelle, Werner Keil
Since
1.0
Version
2.8
See Also
Wikipedia: International System of Units, Wikipedia: 2019 redefinition of the SI base units

Interface Summary

Modifier and TypeInterface and Description
public interface
Acceleration

Rate of change of velocity with respect to time.

public interface
AmountOfSubstance

Number of elementary entities (molecules, for example) of a substance.

public interface
Angle

Figure formed by two lines diverging from a common point.

public interface
Area

Extent of a planar region or of the surface of a solid measured in square units.

public interface
CatalyticActivity

Catalytic activity.

public interface
Dimensionless

Dimensionless quantity.

public interface
ElectricCapacitance

Electric capacitance.

public interface
ElectricCharge

Electric charge.

public interface
ElectricConductance

Electric conductance.

public interface
ElectricCurrent

Amount of electric charge flowing past a specified circuit point per unit time.

public interface
ElectricInductance

Electric inductance.

public interface
ElectricPotential

Electric potential or electromotive force.

public interface
ElectricResistance

Electric resistance.

public interface
Energy

Capacity of a physical system to do work.

public interface
Force

Quantity that tends to produce an acceleration of a body in the direction of its application.

public interface
Frequency

Number of times a specified phenomenon occurs within a specified interval.

public interface
Illuminance

Illuminance.

public interface
Length

Extent of something along its greatest dimension or the extent of space between two objects or places.

public interface
LuminousFlux

Luminous flux.

public interface
LuminousIntensity

Luminous flux density per solid angle as measured in a given direction relative to the emitting source.

public interface
MagneticFlux

Magnetic flux.

public interface
MagneticFluxDensity

Magnetic flux density.

public interface
Mass

Measure of the quantity of matter that a body or an object contains.

public interface
Power

Rate at which work is done.

public interface
Pressure

Force applied uniformly over a surface.

public interface
RadiationDoseAbsorbed

Amount of energy deposited per unit of mass.

public interface
RadiationDoseEffective

Effective (or "equivalent") dose of radiation received by a human or some other living organism.

public interface
Radioactivity

Radioactive activity.

public interface
SolidAngle

Angle formed by three or more planes intersecting at a common point.

public interface
Speed

Distance traveled divided by the time of travel.

public interface
Temperature

Degree of hotness or coldness of a body or an environment.

public interface
Time

Period of existence or persistence.

public interface
Volume

Amount of space occupied by a three-dimensional object or region of space.