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

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

public class ConverterToFloat
extends Object

Converter of any Object to Float.


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

Constructor Detail

ConverterToFloat

public ConverterToFloat()
Method Detail

convert

public static Float convert(Object o)
                     throws NumberFormatException
Converts an Object to Float 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:
Float
Throws:
NumberFormatException - Thrown when the argument cannot be converted to Float


Copyright © 2008-2011 SEAF. All Rights Reserved.