BEA Systems, Inc.

theory.smart.axiom.units
Interface UnitConverter


public interface UnitConverter
extends Session

The Unit Converter provides intelligent conversion of Quantities between various units.

See Also:
UnitConverterHome, UnitConverterImpl

Method Summary
 Quantity convert(Quantity qty, Unit unit)
          Convert the input quanity into a new Quanity with the specified Unit.
 Quantity convert(Quantity qty, Unit unit, java.lang.String category)
          Convert the input quanity into a new Quanity with the specified Unit.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

convert

public Quantity convert(Quantity qty,
                        Unit unit)
                 throws java.rmi.RemoteException
Convert the input quanity into a new Quanity with the specified Unit. The category of the unit is first determined and the appropriate Unit Conversion is retrieved. The Quantity is the converted first to the atomic unit and then to the requested unit.

convert

public Quantity convert(Quantity qty,
                        Unit unit,
                        java.lang.String category)
                 throws java.rmi.RemoteException
Convert the input quanity into a new Quanity with the specified Unit. The caller specifes the category of the unit so that the appropriate Unit Conversion can be more quickly retrieved. The Quantity is converted first to the atomic unit and then into the requested unit.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved