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.
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
You can access the API by adding the following Maven dependencies:
For JSR 385 use
<dependency> <groupId>javax.measure</groupId> <artifactId>unit-api</artifactId> <version>1.0</version> </dependency>
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.