org.apache.cayenne.util

## Class ConversionUtil

- java.lang.Object
- - org.apache.cayenne.util.ConversionUtil

-     public class ConversionUtil
      extends Object

  A collection of static conversion utility methods.
  Since:
    1.1

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BigDecimal` | `toBigDecimal(Object object)`
    `static boolean` | `toBoolean(Object object)`
    `static Comparable` | `toComparable(Object object)` Attempts to convert an object to Comparable instance.
    `static int` | `toInt(Object object, int defaultValue)`
    `static long` | `toLong(Object object, long defaultValue)`
    `static String` | `toString(Object object)` Attempts to convert an object to Comparable instance.
    `static Object` | `toUpperCase(Object object)` Attempts to convert an object to an uppercase string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### toInt

          public static int toInt(Object object,
                                  int defaultValue)

    - #### toLong

          public static long toLong(Object object,
                                    long defaultValue)

      Since:
        3.1

    - #### toBoolean

          public static boolean toBoolean(Object object)

    - #### toBigDecimal

          public static BigDecimal toBigDecimal(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.

Copyright © 2001–2017 Apache Cayenne. All rights reserved.