JSR 275: Units Specification
javax.measure.units
JSR-275 specifies one or more Java packages for the programmatic handling of physical quantities and their expression as numbers of units. The specification includes:
Checking of unit compatibility
Expression of a quantity in various units
Arithmetic operations on units
Concrete classes implementing the standard types of units (such as base, supplementary, and derived) and unit conversions.
Classes for parsing unit specifications in string form and for formatting string representations of quantities.
A database of predefined units.