Class IdentityUnitConverter

java.lang.Object
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: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
  • Constructor Details

    • IdentityUnitConverter

      public IdentityUnitConverter()
      Create a new unit converter.
  • Method Details

    • 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