org.apache.camel.converter
Class ObjectConverter

java.lang.Object
  extended by org.apache.camel.converter.ObjectConverter

public class ObjectConverter
extends Object

Some core java.lang based Type Converters

Version:
$Revision: 563607 $

Method Summary
static boolean isCollection(Object value)
           
static Iterator iterator(Object value)
          Creates an iterator over the value if the value is a collection, an Object[] or a primitive type array; otherwise to simplify the caller's code, we just create a singleton collection iterator over a single value
static boolean toBool(Object value)
          Converts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a boolean
static Boolean toBoolean(Boolean value)
          Returns the boolean value, or null if the value is null
static Boolean toBoolean(Object value)
          Converts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a boolean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isCollection

public static boolean isCollection(Object value)

iterator

public static Iterator iterator(Object value)
Creates an iterator over the value if the value is a collection, an Object[] or a primitive type array; otherwise to simplify the caller's code, we just create a singleton collection iterator over a single value


toBool

public static boolean toBool(Object value)
Converts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a boolean


toBoolean

public static Boolean toBoolean(Object value)
Converts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a boolean


toBoolean

public static Boolean toBoolean(Boolean value)
Returns the boolean value, or null if the value is null



Copyright © 2007 Apache Software Foundation. All Rights Reserved.