Class ConversionUtil


  • public final class ConversionUtil
    extends Object
    A collection of static conversion utility methods.
    Since:
    1.1
    • Method Detail

      • toInt

        public static int toInt​(Object object,
                                int defaultValue)
      • toLong

        public static long toLong​(Object object,
                                  long defaultValue)
        Since:
        3.1
      • toDouble

        public static double toDouble​(Object object,
                                      double defaultValue)
        Since:
        4.0
      • toBoolean

        public static boolean toBoolean​(Object object)
      • toComparable

        public static Comparable toComparable​(Object object)
        Attempts to convert an object to Comparable instance.
      • toString

        public static String toString​(Object object)
        Attempts to convert an object to Comparable instance.
      • toUpperCase

        public static Object toUpperCase​(Object object)
        Attempts to convert an object to an uppercase string.