Package org.goplanit.utils.math
Class TypeConversionUtil
- java.lang.Object
-
- org.goplanit.utils.math.TypeConversionUtil
-
public class TypeConversionUtil extends Object
some utility functions for converting types easily- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description TypeConversionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BigDecimal
doubleStringToBigDecimal(String theDouble)
convert a string that can be interpreted as a double to a type that parses double via.valueOf(double theDouble)
static BigDecimal
longStringToBigDecimal(String longValue)
convert a string that can be interpreted as a long to a type that parses long via.valueOf(long theLong)
static BigInteger
toBigInteger(String longValue)
convert a string that can be interpreted as a long to a type that parses long via.valueOf(long theLong)
-
-
-
Method Detail
-
toBigInteger
public static BigInteger toBigInteger(String longValue)
convert a string that can be interpreted as a long to a type that parses long via.valueOf(long theLong)
- Parameters:
longValue
- in string form- Returns:
- the parsed entry in type T
-
longStringToBigDecimal
public static BigDecimal longStringToBigDecimal(String longValue)
convert a string that can be interpreted as a long to a type that parses long via.valueOf(long theLong)
- Parameters:
longValue
- in string form- Returns:
- the parsed entry in type T
-
doubleStringToBigDecimal
public static BigDecimal doubleStringToBigDecimal(String theDouble)
convert a string that can be interpreted as a double to a type that parses double via.valueOf(double theDouble)
- Parameters:
theDouble
- in string form- Returns:
- the parsed entry in type T
-
-