2.17.2: 2011-06-17

net.sf.basedb.util.units
Class IdentityUnitConverter

java.lang.Object
  extended by net.sf.basedb.util.units.IdentityUnitConverter
All Implemented Interfaces:
UnitConverter

public class IdentityUnitConverter
extends Object
implements UnitConverter

A unit "converter" that doesn't modify the values.

Version:
2.9
Author:
Nicklas
Last modified
$Date: 2008-09-25 09:01:30 +0200 (Thu, 25 Sep 2008) $

Constructor Summary
IdentityUnitConverter()
          Create a new unit converter.
 
Method Summary
 double convertToReferenceUnit(double specific)
          Convert a value from the specific unit to the reference unit.
 double convertToSpecificUnit(double ref)
          Convert a value from the reference unit to the specific unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityUnitConverter

public IdentityUnitConverter()
Create a new unit converter.

Method Detail

convertToReferenceUnit

public double convertToReferenceUnit(double specific)
Description copied from interface: UnitConverter
Convert a value from the specific unit to the reference unit.

Specified by:
convertToReferenceUnit in interface UnitConverter
Parameters:
specific - The value to convert
Returns:
The 'specific' value unmodified

convertToSpecificUnit

public double convertToSpecificUnit(double ref)
Description copied from interface: UnitConverter
Convert a value from the reference unit to the specific unit.

Specified by:
convertToSpecificUnit in interface UnitConverter
Parameters:
ref - The reference value
Returns:
The 'ref' value unmodified

2.17.2: 2011-06-17