Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.util
Class ObjectUtils

    java.lang.Object
      org.apache.commons.lang.ObjectUtils
          org.mule.util.ObjectUtils

    public class ObjectUtils

extends ObjectUtils

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.commons.lang.ObjectUtils
`ObjectUtils.Null`

Field Summary
`protected static Log` | `logger` logger used by this class

Fields inherited from class org.apache.commons.lang.ObjectUtils
`NULL`

Constructor Summary
`ObjectUtils()`

Method Summary
`static boolean` | `getBoolean(Object answer, boolean defaultValue)` Gets a boolean from a value in a null-safe manner.
`static byte` | `getByte(Object answer, byte defaultValue)` Gets a byte from a value in a null-safe manner.
`static double` | `getDouble(Object answer, double defaultValue)` Gets a double from a value in a null-safe manner.
`static float` | `getFloat(Object answer, float defaultValue)` Gets a float from a value in a null-safe manner.
`static int` | `getInt(Object answer, int defaultValue)` Gets a int from a value in a null-safe manner.
`static long` | `getLong(Object answer, long defaultValue)` Gets a long from a value in a null-safe manner.
`static short` | `getShort(Object answer, short defaultValue)` Gets a short from a value in a null-safe manner.
`static String` | `getString(Object answer, String defaultValue)` Gets a String from a value in a null-safe manner.
`static String` | `identityToShortString(Object obj)` Like `ObjectUtils.identityToString(Object)` but without the object's full package name.

Methods inherited from class org.apache.commons.lang.ObjectUtils
`appendIdentityToString, defaultIfNull, equals, hashCode, identityToString, identityToString, max, min, toString, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected static final Log logger

  logger used by this class

Constructor Detail

### ObjectUtils

    public ObjectUtils()

Method Detail

### identityToShortString

    public static String identityToShortString(Object obj)

  Like `ObjectUtils.identityToString(Object)` but without the object's full package name.

  Parameters:
    `obj` - the object for which the identity description is to be generated
  Returns:
    the object's identity description in the form of "ClassName@IdentityCode" or "null" if the argument was null.

### getString

    public static String getString(Object answer,
                                   String defaultValue)

  Gets a String from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a String, or the defaultValue

### getBoolean

    public static boolean getBoolean(Object answer,
                                     boolean defaultValue)

  Gets a boolean from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a boolean, or the defaultValue

### getByte

    public static byte getByte(Object answer,
                               byte defaultValue)

  Gets a byte from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a byte, or the defaultValue

### getShort

    public static short getShort(Object answer,
                                 short defaultValue)

  Gets a short from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a short, or the defaultValue

### getInt

    public static int getInt(Object answer,
                             int defaultValue)

  Gets a int from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a int, or the defaultValue

### getLong

    public static long getLong(Object answer,
                               long defaultValue)

  Gets a long from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a long, or the defaultValue

### getFloat

    public static float getFloat(Object answer,
                                 float defaultValue)

  Gets a float from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a float, or the defaultValue

### getDouble

    public static double getDouble(Object answer,
                                   double defaultValue)

  Gets a double from a value in a null-safe manner.

  Parameters:
    `answer` - the object value
    `defaultValue` - the default to use if null or of incorrect type
  Returns:
    the value as a double, or the defaultValue

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.