Package net.sourceforge.unit

The unit package allows one to convert from one set of units to another.

See:
          Description

Interface Summary
ParseConstants  
 

Class Summary
Chemistry The Chemistry system of units (K, g, atm, mol/L, L, J/mol.
Converter  
English The English (or Imperial) system of units (ft, lb, lbm, R, F, BTU, psi, ft lb).
EnglishR The English system of units using R instead of F.
Metric The Metric system of units.
MetricK The Metric system of units, using K instead of C.
ParseTokenManager  
Quantity A Quantity is a number together with a unit.
Rocketdyne The unit system I usually used at Rocketdyne.
Unit A Unit converts from one set of units to another.
UnitList This class makes a list of units and their definitions.
UnitSystem A UnitSystem is a collection of prefered units, such as metric or English.
 

Exception Summary
ParseException This exception is thrown when parse errors are encountered.
UnitMismatchException Used to signal that two units are not compatible
 

Error Summary
TokenMgrError  
 

Package net.sourceforge.unit Description

The unit package allows one to convert from one set of units to another. For example from feet to meters. Most of the conversion factors are taken from the U.S. National Institute of Standards and Technology, NIST.

See the sourceforge Project Page for more information.

If you would prefer to use lb for pound mass, you can have the code
Unit.newUnit("lb", 1, "lbm")
before you use it. This will create a new unit with the same name as the old one, but with a new definition. This new Unit is then stored in the internal table of units under the name "lb". Now, any more calls to newUnit will use this new definition of "lb".

According to the National Institute of Standards and Technology (NIST), the Btu and calorie were redefined at the Fifth International Conference on the Properties of Steam (London, July 1956). These are marked as International Table above. An alternate definition is listed as "Thermochemical".

Note to would-be package maintainers: to add a new unit, you should edit the file UnitList.java, which will create package.html and UnitInit.java. The parser in this package was created with JavaCC

Version:
$Name: $, $Revision: 1.5 $
Author:
Fred Gylys-Colwell
See Also:
Unit, UnitSystem, Converter