net.sf.seaf.util.convert.simple
Class ConverterToDouble

java.lang.Object
  extended by net.sf.seaf.util.convert.simple.ConverterToDouble

public class ConverterToDouble
extends Object

Converter of any Object to Double.


Constructor Summary
ConverterToDouble()
           
 
Method Summary
static Double convert(Object o)
          Converts an Object to Double value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterToDouble

public ConverterToDouble()
Method Detail

convert

public static Double convert(Object o)
                      throws NumberFormatException
Converts an Object to Double value.

Keeps null as null. Boolean is converted to 1 or 0. Throws NumberFormatException if cannot be parsed.

Parameters:
o - Object to be converted
Returns:
Double
Throws:
NumberFormatException - Thrown when the argument cannot be converted to Double


Copyright © 2008-2012 SEAF. All Rights Reserved.