API

The Unit of Measurement API provides a set of Java language programming interfaces for handling units and quantities.
The interfaces provide a layer which separates client code, that would call the API,
from library code, which implements the API.

alt text

The specification contains Interfaces and abstract classes with methods for unit operations:
* Checking of unit compatibility
* Expression of a quantity in various units
* Arithmetic operations on units

The JSR is lead by Jean-Marie Dautelle (@dautelle), Werner Keil (@keilw) and Otavio Santana (@otaviojava).
You can access the API by adding the following Maven dependencies:

<dependency>
  <groupId>javax.measure</groupId>
  <artifactId>unit-api</artifactId>
  <version>1.0</version>
</dependency>
For JSR 385 use <version>2.0-SNAPSHOT</version> or <version>2.0-EDR</version> .

Further versions can be found here.

Release artifacts should be accessible from the following repositories:

  • Maven Central
  • JCenter by Bintray

Though it is possible to only reference the API from your applicaiton, you also have to add an implementation like the Indriya reference implementation.