Java Units Specification
ONJava.com: Apples and Oranges (and the Java Units Specification) [Jan. 07, 2004]
This article discusses JSR-108, the Java Units Specification, which allows developers to create systems of units and to define conversion and representation rules in Java. Using an implementation of the Java Units spec, you would be able to attach a unit to a number so that when defining a rectangle in your program, it is clear that its length equals six feet, six meters, six miles, six light years, or some other standard unit of length, rather than just six. Following the definition of fundamental concepts, we will present this JSR, discuss possible uses and limitations, and provide ideas for future extensions. The article should be of interest to developers involved with scientific, financial, industrial, or other applications where units are of importance.
This article discusses JSR-108, the Java Units Specification, which allows developers to create systems of units and to define conversion and representation rules in Java. Using an implementation of the Java Units spec, you would be able to attach a unit to a number so that when defining a rectangle in your program, it is clear that its length equals six feet, six meters, six miles, six light years, or some other standard unit of length, rather than just six. Following the definition of fundamental concepts, we will present this JSR, discuss possible uses and limitations, and provide ideas for future extensions. The article should be of interest to developers involved with scientific, financial, industrial, or other applications where units are of importance.