The Units of Measurement Framework provides a Java API for handling units, which are presented in a uniform manner, allowing conversion of their values from one unit and scale to another.
Overview
The Units of Measurement Framework provides a set of Java language programming interfaces for handling and converting units, presented in a uniform manner.
The base entity is Quantity. It represents a value expressed as a number and measured in the given unit.
A "unit" is considered to be a real scalar quantity, defined and adopted by a convention. If two quantities of the same kind have to be compared, the unit is the number showing the ratio between them.
Each Quantity has:
value;
units of measurements.
An example is the Quantity for temperature – the quantity is temperature, the unit is Celsius or Kelvin and the system of units is SI or the unit can be Fahrenheit if the system of units is Imperial. The provided API allows conversion from one unit and scale to another.
Feature Set
The Units of Measurement Framework provides the following features and functionalities:
Support for different Units of different System of Units;
Conversion of values from one unit and scale to another;
Ultraviolet Index (UVI) – Represents the non-SI unit of dimensionless quantity of the Ultraviolet Index (UVI).
Volumetric water content – Represents the non-SI unit of dimensionless quantity of the volumetric water content.
Water activity – Represents the non-SI unit of dimensionless quantity of the water activity.
Colors System of Units. Contains the following constants for color models:
RGB – Represents the RGB color model in which red, green and blue are used. The numeric representation is using all values in the range [0, 1] for each component.
HSV – Represents the HSV color model in which hue, saturation and value are used. The numeric representation is based on: hue - all angles in the range [0, 360) and saturation and value - all values in the range [0, 1].