com.sap.mdm.util
Class MeasurementUtils

java.lang.Object
  extended bycom.sap.mdm.util.MeasurementUtils

public class MeasurementUtils
extends Object


Constructor Summary
MeasurementUtils()
           
 
Method Summary
static double convertFromUniversal(DimensionId dimensionId, UnitId unitIdTo, double value, DimensionsManager dimensionManager)
          Convert measurement value from the universal UOM to the specified UOM
static double convertMeasurementValue(DimensionId dimensionId, UnitId unitIdFrom, UnitId unitIdTo, double value, DimensionsManager dimensionManager)
          Convert measurement value from one UOM to another
static double convertToUniversal(DimensionId dimensionId, UnitId unitIdFrom, double value, DimensionsManager dimensionManager)
          Convert measurement value to universal UOM value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasurementUtils

public MeasurementUtils()
Method Detail

convertToUniversal

public static double convertToUniversal(DimensionId dimensionId,
                                        UnitId unitIdFrom,
                                        double value,
                                        DimensionsManager dimensionManager)
Convert measurement value to universal UOM value

Parameters:
dimensionId - ID of dimension
unitIdFrom - ID of the current UOM
value - the current value of the measurement
dimensionManager - the DimensionManager instance. If Null then only build-in dimensions will be used.
Returns:
the converted value

convertFromUniversal

public static double convertFromUniversal(DimensionId dimensionId,
                                          UnitId unitIdTo,
                                          double value,
                                          DimensionsManager dimensionManager)
Convert measurement value from the universal UOM to the specified UOM

Parameters:
dimensionId - ID of dimension
unitIdTo - ID of the desired UOM
value - the value of measurement in universal UOM
dimensionManager - the DimensionManager instance. If Null then only build-in dimensions will be used.
Returns:
the converted value

convertMeasurementValue

public static double convertMeasurementValue(DimensionId dimensionId,
                                             UnitId unitIdFrom,
                                             UnitId unitIdTo,
                                             double value,
                                             DimensionsManager dimensionManager)
Convert measurement value from one UOM to another

Parameters:
dimensionId - ID of dimension
unitIdFrom - ID of the current UOM
unitIdTo - ID of the desired UOM
value - the value of measurement in the current UOM
dimensionManager - the DimensionManager instance. If Null then only build-in dimensions will be used.
Returns:
the converted value


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.