org.rubato.util
Class DoubleConverter

java.lang.Object
  extended by org.rubato.util.DoubleConverter

public abstract class DoubleConverter
extends java.lang.Object

Subclasses of this class specialize in converting module elements to and from double.

Author:
Gérard Milmeister

Constructor Summary
DoubleConverter()
           
 
Method Summary
abstract  ModuleElement fromDouble(double x)
          Converts the double x to a module element.
static DoubleConverter makeDoubleConverter(Module m)
          Creates a new converter that converts between double and the elements from the module m.
abstract  double toDouble(ModuleElement x)
          Converts the module element x to double.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleConverter

public DoubleConverter()
Method Detail

toDouble

public abstract double toDouble(ModuleElement x)
Converts the module element x to double.


fromDouble

public abstract ModuleElement fromDouble(double x)
Converts the double x to a module element.


makeDoubleConverter

public static DoubleConverter makeDoubleConverter(Module m)
Creates a new converter that converts between double and the elements from the module m.

Returns:
null if no such converter could be created