Jean-Marie Dautelle and Werner Keil have posted the early draft review of JSR 275, Units Specification, to the Java Community Process. According to the draft,
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:
- Interfaces and abstract classes with methods for unit operations:
- 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.
This sounds interesting, and I hope they can make it work, but I'm not yet convinced it's possible within the existing language. Comments are due by July 8.