com.ozdevworx.dtype.util
Class ParseNumber

java.lang.Object
  extended by com.ozdevworx.dtype.util.ParseNumber

public class ParseNumber
extends java.lang.Object

Persistant number casting class.
Throws a NumberFormatException wrapped in an SQLException if a value cannot be parsed into a valid number.

Version:
1.0.0.1
Author:
Tim Gall, 2008-07-01, Tim Gall, 2010-04-10

Constructor Summary
ParseNumber()
           
 
Method Summary
static java.math.BigDecimal getBigDecimal(java.lang.Object value)
           
static java.math.BigDecimal getBigDecimal(java.lang.String textValue)
           
static java.math.BigInteger getBigInteger(java.lang.Object value)
           
static java.math.BigInteger getBigInteger(java.lang.String textValue)
           
static double getDouble(java.lang.Object value)
           
static double getDouble(java.lang.String textValue)
           
static float getFloat(java.lang.Object value)
           
static float getFloat(java.lang.String textValue)
           
static int getInt(java.lang.Object value)
           
static int getInt(java.lang.String textValue)
           
static java.lang.Long getLong(java.lang.Object value)
           
static java.lang.Long getLong(java.lang.String textValue)
           
static java.lang.Short getShort(java.lang.Object value)
           
static java.lang.Short getShort(java.lang.String textValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseNumber

public ParseNumber()
Method Detail

getBigDecimal

public static java.math.BigDecimal getBigDecimal(java.lang.Object value)
                                          throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getBigDecimal

public static java.math.BigDecimal getBigDecimal(java.lang.String textValue)
                                          throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getBigInteger

public static java.math.BigInteger getBigInteger(java.lang.Object value)
                                          throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getBigInteger

public static java.math.BigInteger getBigInteger(java.lang.String textValue)
                                          throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getDouble

public static double getDouble(java.lang.Object value)
                        throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getDouble

public static double getDouble(java.lang.String textValue)
                        throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getFloat

public static float getFloat(java.lang.Object value)
                      throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getFloat

public static float getFloat(java.lang.String textValue)
                      throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getInt

public static int getInt(java.lang.Object value)
                  throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getInt

public static int getInt(java.lang.String textValue)
                  throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getLong

public static java.lang.Long getLong(java.lang.Object value)
                              throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getLong

public static java.lang.Long getLong(java.lang.String textValue)
                              throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getShort

public static java.lang.Short getShort(java.lang.Object value)
                                throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException

getShort

public static java.lang.Short getShort(java.lang.String textValue)
                                throws IlegalNumberTypeException
Throws:
IlegalNumberTypeException