This package supports measurable quantities, which can be expressed
Those tuples are not necessarily used directly in numerically intensive code.
They are more useful as meta-data converted to the application internal representation
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
but users can apply the same approach to their own classes. In the example
Vector3D are user-defined
// 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.
Interface Summary Interface Description AccelerationRate of change of velocity with respect to time. AmountOfSubstanceNumber of elementary entities (molecules, for example) of a substance. AngleFigure formed by two lines diverging from a common point. AreaExtent of a planar region or of the surface of a solid measured in square units. CatalyticActivityCatalytic activity. DimensionlessDimensionless quantity. ElectricCapacitanceElectric capacitance. ElectricChargeElectric charge. ElectricConductanceElectric conductance. ElectricCurrentAmount of electric charge flowing past a specified circuit point per unit time. ElectricInductanceElectric inductance. ElectricPotentialElectric potential or electromotive force. ElectricResistanceElectric resistance. EnergyCapacity of a physical system to do work. ForceQuantity that tends to produce an acceleration of a body in the direction of its application. FrequencyNumber of times a specified phenomenon occurs within a specified interval. IlluminanceIlluminance. LengthExtent of something along its greatest dimension or the extent of space between two objects or places. LuminousFluxLuminous flux. LuminousIntensityLuminous flux density per solid angle as measured in a given direction relative to the emitting source. MagneticFluxMagnetic flux. MagneticFluxDensityMagnetic flux density. MassMeasure of the quantity of matter that a body or an object contains. PowerRate at which work is done. PressureForce applied uniformly over a surface. RadiationDoseAbsorbedAmount of energy deposited per unit of mass. RadiationDoseEffectiveEffective (or "equivalent") dose of radiation received by a human or some other living organism. RadioactivityRadioactive activity. SolidAngleAngle formed by three or more planes intersecting at a common point. SpeedDistance traveled divided by the time of travel. TemperatureDegree of hotness or coldness of a body or an environment. TimePeriod of existence or persistence. VolumeAmount of space occupied by a three-dimensional object or region of space.