Class TypeConversionUtil


  • public class TypeConversionUtil
    extends Object
    some utility functions for converting types easily
    Author:
    markr
    • Constructor Detail

      • TypeConversionUtil

        public TypeConversionUtil()
    • 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