// ConvertDouble.java
// $Id: ConvertDouble.java,v 1.2 1997/07/30 14:05:19 ylafon Exp $  
// (c) COPYRIGHT MIT and INRIA, 1997.
// Please first read the full copyright statement in file COPYRIGHT.html

package w3c.tools.resources.converter;

public class ConvertDouble implements Convert {

  public void setInitialClass(Class c){}

  public Object defaultValue() {
    return new Double(-1);
  }

  public String toString(Object O) {
    return String.valueOf(O);
  }

  public Object toObject(String S) {
    return new Double(S);
  }

  public Class classConverted() {
    try {
      return Class.forName("java.lang.Double");
    } catch (ClassNotFoundException ex) {
      System.out.println(ex.getMessage());
      ex.printStackTrace();
      return null;
    }
  }

}
