jMobileCore toolkit

com.jmobilecore.support
Class Convert

java.lang.Object
  extended by com.jmobilecore.support.Convert

public class Convert
extends java.lang.Object

This class contains convertions methods

Author:
Greg Gridin

Constructor Summary
Convert()
           
 
Method Summary
static boolean toBoolean(java.lang.Object obj, boolean defValue)
          Converts object to the boolean value
static int toInteger(java.lang.Object obj, int defValue)
          Converts object to the int value
static long toLong(java.lang.Object obj, long defValue)
          Converts object to the long value
static java.lang.String toString(java.lang.Object obj, java.lang.String defValue)
          Converts object to the String value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Convert

public Convert()
Method Detail

toBoolean

public static boolean toBoolean(java.lang.Object obj,
                                boolean defValue)
Converts object to the boolean value

Parameters:
obj - the object for convertion
defValue - the default value used if obj is null
Returns:
the int representing obj parameter

toInteger

public static int toInteger(java.lang.Object obj,
                            int defValue)
Converts object to the int value

Parameters:
obj - the object for convertion
defValue - the default value used if obj is null
Returns:
the int representing obj parameter

toLong

public static long toLong(java.lang.Object obj,
                          long defValue)
Converts object to the long value

Parameters:
obj - the object for convertion
defValue - the default value used if obj is null
Returns:
the long representing obj parameter

toString

public static java.lang.String toString(java.lang.Object obj,
                                        java.lang.String defValue)
Converts object to the String value

Parameters:
obj - the object for convertion
defValue - the default value used if obj is null
Returns:
the String representing obj parameter

jMobileCore toolkit