UnitParser (Java)

Java version of UnitParser, the FlexibleParser part which deals with units of measurement
UnitParser is a comprehensive parsing .NET library which can deal with numerous situations related to units of measurement. It is the first part of FlexibleParser. This page refers to the Java version, a conversion of the code which I originally developed in C#.

You can take a look at (ready to be used with Eclipse), download () or
its Javadoc, or read .

To use UnitParser.jar (or UnitParser_without_javadoc.jar), just add it to your project and use the resources in the UnitParser package. Additionally to reading the readme file, you should also take a look at to get a proper idea about its main features.

By bearing in mind the multiple sintax similarities between Java and C#, you might be interested in analysing the resources associated with (e.g., ). In any case, note that the Java version doesn't include the following aspects present in the .NET one:
  • No custom operators. All the arithmetic operations are performed via the corresponding UnitP methods (e.g., UnitP.Multiplication).
  • No reliance on the decimal type. The main numeric type is double (or Double).