gov.sns.tools.transforms
Class DoubleTransformAdaptor

java.lang.Object
  |
  +--gov.sns.tools.transforms.DoubleTransformAdaptor
All Implemented Interfaces:
DataTransform, DoubleTransform

public abstract class DoubleTransformAdaptor
extends java.lang.Object
implements DoubleTransform

An abstact class that provides a convenient base for classes implementing DoubleTransform. The developer need only implement the non-inherited methods of the DoubleTransform interface. Even if you do not want to subclass this class, it provides a static helper method from implementing the valueTransform() method required by DataTransform.

See Also:
DataTransformFactory

Field Summary
 
Fields inherited from interface gov.sns.tools.transforms.DataTransform
noOperationTransform
 
Constructor Summary
DoubleTransformAdaptor()
           
 
Method Summary
abstract  double convertFromRaw(double rawValue)
          DoubleTransform interface
abstract  double convertToRaw(double physicalValue)
          DoubleTransform interface
static ValueTransform implementValueTransform(DoubleTransform transform)
          Helper method for implementing the valueTransform() DataTransform method for a DoubleTransform implementation.
 ValueTransform valueTransform()
          Implement DataTransform interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleTransformAdaptor

public DoubleTransformAdaptor()
Method Detail

convertFromRaw

public abstract double convertFromRaw(double rawValue)
DoubleTransform interface

Specified by:
convertFromRaw in interface DoubleTransform
Parameters:
rawValue - The raw value to be converted to a physical value.
Returns:
A physical equivalent of the raw value.

convertToRaw

public abstract double convertToRaw(double physicalValue)
DoubleTransform interface

Specified by:
convertToRaw in interface DoubleTransform
Parameters:
physicalValue - The physical value to be converted to a raw value.
Returns:
A raw value equivalent of the physical value.

valueTransform

public final ValueTransform valueTransform()
Implement DataTransform interface

Specified by:
valueTransform in interface DataTransform
Returns:
An equivalent value transform for converting ArrayValue stores.

implementValueTransform

public static ValueTransform implementValueTransform(DoubleTransform transform)
Helper method for implementing the valueTransform() DataTransform method for a DoubleTransform implementation.