net.sf.seaf.util.convert.simple
Class ConverterToLong
java.lang.Object
net.sf.seaf.util.convert.simple.ConverterToLong
public class ConverterToLong
- extends Object
Converter of any Object to Long.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterToLong
public ConverterToLong()
convert
public static Long convert(Object o)
throws NumberFormatException
- Converts an Object to Long value.
Keeps null as null. Floating point number is cut to its longValue().
Boolean is converted to 1 or 0. Throws NumberFormatException if cannot be
parsed.
- Parameters:
o - Object to be converted
- Returns:
- Long
- Throws:
NumberFormatException - Thrown when the argument cannot be converted to Long
Copyright © 2008-2012 SEAF. All Rights Reserved.