railo.runtime.op
Class Caster

java.lang.Object
  extended by railo.runtime.op.Caster

public final class Caster
extends Object

This class can cast object of one type to a other by cold fusion rules


Method Summary
static Object castTo(PageContext pc, Class trgClass, Object obj)
           
static Object castTo(PageContext pc, short type, Object o)
          cast a value to a value defined by type argument
static Object castTo(PageContext pc, short type, String strType, Object o)
          cast a value to a value defined by type argument
static Object castTo(PageContext pc, String type, Object o, boolean alsoPattern)
          cast a value to a value defined by type argument
static Class cfTypeToClass(String type)
           
static boolean stringToBooleanValue(String str)
          cast a String to a boolean value (primitive value type)
static int stringToBooleanValueEL(String str)
          cast a String to a boolean value (primitive value type), return 1 for true, 0 for false and -1 if can't cast to a boolean type
static Array toArray(Object o)
          cast a Object to a Array Object
static Array toArray(Object o, Array defaultValue)
          cast a Object to a Array Object
static String toB64(byte[] b)
           
static String toB64(byte[] b, String defaultValue)
           
static String toB64(String str, String charset)
           
static String toB64(String str, String charset, String defaultValue)
           
static String toBase64(Object o, String charset)
          cast a Object to a Base64 value
static String toBase64(Object o, String charset, String defaultValue)
          cast a Object to a Base64 value
static BigDecimal toBigDecimal(Object o)
           
static byte[] toBinary(Object o)
          cast a Object to a Binary
static byte[] toBinary(Object o, byte[] defaultValue)
          cast a Object to a Binary
static InputStream toBinaryStream(Object obj)
           
static Boolean toBoolean(boolean b)
          cast a boolean value to a Boolean Object(reference type)
static Boolean toBoolean(char c)
          cast a char value to a Boolean Object(reference type)
static Boolean toBoolean(double d)
          cast a double value to a Boolean Object(reference type)
static Boolean toBoolean(int i)
          cast a int value to a Boolean Object(reference type)
static Boolean toBoolean(long l)
          cast a long value to a Boolean Object(reference type)
static Boolean toBoolean(Object o)
          cast a Object to a Boolean Object(reference type)
static Boolean toBoolean(Object o, Boolean defaultValue)
          cast a Object to a boolean value (refrence type), Exception Less
static Boolean toBoolean(String str)
          cast a Object to a Boolean Object(reference type)
static Boolean toBoolean(String str, Boolean defaultValue)
           
static boolean toBooleanValue(boolean b)
          cast a boolean value to a boolean value (do nothing)
static boolean toBooleanValue(Boolean b)
          tranlate a Boolean object to a boolean value
static boolean toBooleanValue(char c)
          cast a double value to a boolean value (primitive value type)
static boolean toBooleanValue(double d)
          cast a double value to a boolean value (primitive value type)
static boolean toBooleanValue(int i)
          cast a int value to a boolean value (primitive value type)
static boolean toBooleanValue(long l)
          cast a long value to a boolean value (primitive value type)
static boolean toBooleanValue(Object o)
          cast a Object to a boolean value (primitive value type)
static boolean toBooleanValue(Object o, boolean defaultValue)
          cast a Object to a boolean value (primitive value type), Exception Less
static boolean toBooleanValue(String str)
          cast a Object to a boolean value (primitive value type)
static Byte toByte(boolean b)
          cast a boolean value to a Byte Object(reference type)
static Byte toByte(char c)
          cast a char value to a Byte Object(reference type)
static Byte toByte(double d)
          cast a double value to a Byte Object(reference type)
static Byte toByte(Object o)
          cast a Object to a Byte Object(reference type)
static Byte toByte(Object o, Byte defaultValue)
          cast a Object to a Byte Object(reference type)
static Byte toByte(String str)
          cast a Object to a Byte Object(reference type)
static byte[] toBytes(Object obj)
           
static byte toByteValue(boolean b)
          cast a boolean value to a byte value
static byte toByteValue(char c)
          cast a char value to a byte value (do nothing)
static byte toByteValue(double d)
          cast a double value to a byte value (primitive value type)
static byte toByteValue(Object o)
          cast a Object to a byte value (primitive value type)
static byte toByteValue(Object o, byte defaultValue)
          cast a Object to a byte value (primitive value type)
static byte toByteValue(String str)
          cast a Object to a byte value (primitive value type)
static Calendar toCalendar(Date date, TimeZone tz)
           
static Calendar toCalendar(long time, TimeZone tz)
           
static Character toCharacter(boolean b)
          cast a boolean value to a Character Object(reference type)
static Character toCharacter(char c)
          cast a char value to a Character Object(reference type)
static Character toCharacter(double d)
          cast a double value to a Character Object(reference type)
static Character toCharacter(Object o)
          cast a Object to a Character Object(reference type)
static Character toCharacter(Object o, Character defaultValue)
          cast a Object to a Character Object(reference type)
static Character toCharacter(String str)
          cast a Object to a Character Object(reference type)
static CharSequence toCharSequence(Object obj)
           
static CharSequence toCharSequence(Object obj, CharSequence defaultValue)
           
static char toCharValue(boolean b)
          cast a boolean value to a char value
static char toCharValue(char c)
          cast a char value to a char value (do nothing)
static char toCharValue(double d)
          cast a double value to a char value (primitive value type)
static char toCharValue(Object o)
          cast a Object to a char value (primitive value type)
static char toCharValue(Object o, char defaultValue)
          cast a Object to a char value (primitive value type)
static char toCharValue(String str)
          cast a Object to a char value (primitive value type)
static String toClassName(Class clazz)
           
static String toClassName(Object o)
           
static Collection toCollection(Object o)
          cast a Object to a Collection
static Collection toCollection(Object o, Collection defaultValue)
          cast a Object to a Collection, if not returns null
static Component toComponent(Object o)
          cast a Object to a Component
static Component toComponent(Object o, Component defaultValue)
           
static Object toCreditCard(Object o)
           
static Object toCreditCard(Object o, String defaultValue)
           
static DateTime toDate(boolean b, TimeZone tz)
          cast a boolean to a DateTime Object
static DateTime toDate(char c, TimeZone tz)
          cast a char to a DateTime Object
static DateTime toDate(double d, TimeZone tz)
          cast a double to a DateTime Object
static DateTime toDate(Object o, boolean alsoNumbers, TimeZone tz)
          cast a Object to a DateTime Object
static DateTime toDate(Object o, boolean alsoNumbers, TimeZone tz, DateTime defaultValue)
          cast a Object to a DateTime Object
static DateTime toDate(Object o, TimeZone tz)
          cast a Object to a DateTime Object
static DateTime toDate(String str, boolean alsoNumbers, TimeZone tz, DateTime defaultValue)
          cast a Object to a DateTime Object
static DateTime toDate(String str, TimeZone tz)
          cast a Object to a DateTime Object
static DateTime toDateTime(Locale locale, String str, TimeZone tz, boolean useCommomDateParserAsWell)
          parse a string to a Datetime Object
static DateTime toDateTime(Locale locale, String str, TimeZone tz, DateTime defaultValue, boolean useCommomDateParserAsWell)
          parse a string to a Datetime Object, returns null if can't convert
static DateTime toDatetime(Object o, TimeZone tz)
          cast a Object to a DateTime Object (alias for toDateTime)
static DateTime toDateTime(Object o, TimeZone tz)
          cast a Object to a DateTime Object
static String toDecimal(boolean value)
          cast a double to a decimal value (String:xx.xx)
static String toDecimal(double value)
          cast a Oject to a decimal value (String:xx.xx)
static String toDecimal(Object value)
          cast a double to a decimal value (String:xx.xx)
static String toDecimal(Object value, String defaultValue)
          cast a double to a decimal value (String:xx.xx)
static String toDecimal(String value)
          cast a double to a decimal value (String:xx.xx)
static Double toDouble(boolean b)
          cast a boolean value to a Double Object (reference Type)
static Double toDouble(double d)
           
static Double toDouble(float f)
          cast a Object to a Double Object (reference Type)
static Double toDouble(Float f)
           
static Double toDouble(Object o)
          cast a Object to a Double Object (reference Type)
static Double toDouble(Object o, Double defaultValue)
          cast a Object to a Double Object (reference Type)
static Double toDouble(String str)
          cast a Object to a Double Object (reference Type)
static double toDoubleValue(boolean b)
          cast a boolean value to a double value (primitive value type)
static double toDoubleValue(char c)
          cast a char value to a double value (primitive value type)
static double toDoubleValue(double d)
          cast a double value to a double value (do nothing)
static double toDoubleValue(Double d)
           
static double toDoubleValue(float f)
           
static double toDoubleValue(Float f)
           
static double toDoubleValue(Object o)
          cast a Object to a double value (primitive value Type)
static double toDoubleValue(Object o, double defaultValue)
          cast a Object to a double value (primitive value Type)
static double toDoubleValue(String str)
          cast a Object to a double value (primitive value Type)
static double toDoubleValue(String str, double defaultValue)
          cast a Object to a double value (primitive value Type), if can't return Double.NaN
static String toEmail(Object o)
           
static String toEmail(Object o, String defaultValue)
           
static File toFile(Object obj)
          convert a object to a File
static File toFile(Object obj, File defaultValue)
          convert a object to a File
static Float toFloat(boolean b)
          cast a boolean value to a Float Object(reference type)
static Float toFloat(char c)
          cast a char value to a Float Object(reference type)
static Float toFloat(double d)
          cast a double value to a Float Object(reference type)
static Float toFloat(Object o)
          cast a Object to a Float Object(reference type)
static Float toFloat(Object o, Float defaultValue)
          cast a Object to a Float Object(reference type)
static Float toFloat(String str)
          cast a Object to a Float Object(reference type)
static float toFloatValue(boolean b)
          cast a boolean value to a float value
static float toFloatValue(char c)
          cast a char value to a long value (do nothing)
static float toFloatValue(double d)
          cast a double value to a long value (primitive value type)
static float toFloatValue(Object o)
          cast a Object to a long value (primitive value type)
static float toFloatValue(Object o, float defaultValue)
          cast a Object to a float value (primitive value type)
static float toFloatValue(String str)
          cast a Object to a long value (primitive value type)
static Struct toFunctionValues(Object[] args)
          convert a object array to a HashMap filled with Function value Objects
static Struct toFunctionValues(Object[] args, int offset, int len)
           
static Object[] toFunctionValues(Struct args)
           
static Object toGUId(Object o)
          cast a Object to a GUID
static Object toGUId(Object o, Object defaultValue)
          cast a Object to a GUID
static Hashtable toHashtable(Object obj)
           
static Integer toInteger(boolean b)
          casts a boolean to a Integer
static Integer toInteger(char c)
          casts a char to a Integer
static Integer toInteger(double d)
          casts a double to a Integer
static Integer toInteger(int i)
           
static Integer toInteger(Object o)
          casts a Object to a Integer
static Integer toInteger(Object o, Integer defaultValue)
          casts a Object to a Integer
static Integer toInteger(String str)
          casts a Object to a Integer
static int toIntValue(boolean b)
          cast a boolean value to a int value (primitive value type)
static int toIntValue(char c)
          cast a char value to a int value (primitive value type)
static int toIntValue(double d)
          cast a double value to a int value (primitive value type)
static int toIntValue(int i)
          cast a int value to a int value (do nothing)
static int toIntValue(Object o)
          cast a Object to a int value (primitive value type)
static int toIntValue(Object o, int defaultValue)
          cast a Object to a int value (primitive value type)
static int toIntValue(String str)
          cast a String to a int value (primitive value type)
static int toIntValue(String str, int defaultValue)
          cast a Object to a double value (primitive value Type), if can't return Integer.MIN_VALUE
static Iterator toIterator(Object o)
          cast a Object to a Iterator or get Iterator from Object
static Collection toJavaCollection(Object o)
           
static Collection.Key toKey(Object o)
           
static Collection.Key toKey(Object o, Collection.Key defaultValue)
           
static List toList(Object o)
          cast a Object to a Array Object
static List toList(Object o, boolean duplicate)
          cast a Object to a Array Object
static List toList(Object o, boolean duplicate, List defaultValue)
          cast a Object to a Array Object
static List toList(Object o, List defaultValue)
          cast a Object to a Array Object
static Locale toLocale(String strLocale)
          casts a string to a Locale
static Locale toLocale(String strLocale, Locale defaultValue)
          casts a string to a Locale
static Long toLong(boolean b)
          cast a boolean value to a Long Object(reference type)
static Long toLong(char c)
          cast a char value to a Long Object(reference type)
static Long toLong(double d)
          cast a double value to a Long Object(reference type)
static Long toLong(long l)
          cast a long to a Long Object(reference type)
static Long toLong(Object o)
          cast a Object to a Long Object(reference type)
static Long toLong(Object o, Long defaultValue)
          cast a Object to a Long Object(reference type)
static Long toLong(String str)
          cast a Object to a Long Object(reference type)
static long toLongValue(boolean b)
          cast a boolean value to a long value
static long toLongValue(char c)
          cast a char value to a long value (do nothing)
static long toLongValue(double d)
          cast a double value to a long value (primitive value type)
static long toLongValue(Object o)
          cast a Object to a long value (primitive value type)
static long toLongValue(Object o, long defaultValue)
          cast a Object to a long value (primitive value type)
static long toLongValue(String str)
          cast a Object to a long value (primitive value type)
static Map toMap(Object o)
          cast a Object to a Map Object
static Map toMap(Object o, boolean duplicate)
          cast a Object to a Map Object
static Map toMap(Object o, boolean duplicate, Map defaultValue)
          cast a Object to a Map Object
static Map toMap(Object o, Map defaultValue)
          cast a Object to a Map Object
static Object[] toNativeArray(Object o)
           
static Node toNode(Object o)
          casts a Object to a XML Node
static Node toNode(Object o, Node defaultValue)
          casts a Object to a XML Node
static NodeList toNodeList(Object o)
          casts a Object to a Node List
static NodeList toNodeList(Object o, NodeList defaultValue)
          casts a Object to a Node List
static Object toNull(Object value)
          casts a Object to null
static Object toNull(Object value, Object defaultValue)
          casts a Object to null
static Objects toObjects(PageContext pc, Object obj)
           
static PageException toPageException(Throwable t)
          cast a Throwable Object to a PageException Object
static String toPhone(Object o)
           
static String toPhone(Object o, String defaultValue)
           
static Query toQuery(Object o)
          cast a Object to a Query Object
static Query toQuery(Object o, boolean duplicate)
          cast a Object to a Query Object
static Query toQuery(Object o, boolean duplicate, Query defaultValue)
          cast a Object to a Query Object
static Query toQuery(Object o, Query defaultValue)
          cast a Object to a Query Object
static QueryPro toQueryPro(Query q)
           
static QueryPro toQueryPro(Query q, QueryPro defaultValue)
           
static Boolean toRef(boolean b)
          cast a boolean value to his (CFML) reference type Boolean
static Byte toRef(byte b)
          cast a byte value to his (CFML) reference type Integer
static String toRef(char c)
          cast a char value to his (CFML) reference type String
static Collection toRef(Collection o)
          cast a Collection to a reference type (Object), in that case this method to nothing, because a Collection is already a reference type
static Double toRef(double d)
          cast a double value to his (CFML) reference type Double
static Float toRef(float f)
          cast a float value to his (CFML) reference type Float
static Integer toRef(int i)
          cast a int value to his (CFML) reference type Integer
static Long toRef(long l)
          cast a long value to his (CFML) reference type Long
static Object toRef(Object o)
          cast a Object to a reference type (Object), in that case this method to nothing, because a Object is already a reference type
static Short toRef(short s)
          cast a double value to his (CFML) reference type Double
static String toRef(String o)
          cast a String to a reference type (Object), in that case this method to nothing, because a String is already a reference type
static Resource toResource(Config config, Object src, boolean existing)
           
static Resource toResource(Object src)
           
static Resource toResource(Object src, boolean existing)
           
static Resource toResource(PageContext pc, Object src, boolean existing)
           
static Resource toResource(PageContext pc, Object src, boolean existing, boolean allowRealpath)
           
static Serializable toSerializable(Object object)
           
static Serializable toSerializable(Object object, Serializable defaultValue)
           
static Short toShort(boolean b)
          cast a boolean value to a Short Object(reference type)
static Short toShort(char c)
          cast a char value to a Short Object(reference type)
static Short toShort(double d)
          cast a double value to a Byte Object(reference type)
static Short toShort(Object o)
          cast a Object to a Byte Object(reference type)
static Short toShort(Object o, Short defaultValue)
          cast a Object to a Byte Object(reference type)
static Short toShort(String str)
          cast a Object to a Byte Object(reference type)
static short toShortValue(boolean b)
          cast a boolean value to a short value
static short toShortValue(char c)
          cast a char value to a short value (do nothing)
static short toShortValue(double d)
          cast a double value to a short value (primitive value type)
static short toShortValue(Object o)
          cast a Object to a short value (primitive value type)
static short toShortValue(Object o, short defaultValue)
          cast a Object to a short value (primitive value type)
static short toShortValue(String str)
          cast a Object to a short value (primitive value type)
static String toSSN(Object o)
           
static String toSSN(Object o, String defaultValue)
           
static String toString(boolean b)
          cast a boolean value to a String
static String toString(double d)
           
static String toString(int i)
          cast a int value to a String
static String toString(long l)
          cast a long value to a String
static String toString(Object o)
          cast a Object to a String
static String toString(Object o, String defaultValue)
          cast a Object to a String dont throw a exception, if can't cast to a string return a empty string
static String toString(String str)
          cast a String to a String (do Nothing)
static String toString3(double d)
          cast a double value to a String
static StringBuffer toStringBuffer(Object obj)
           
static String toStringForce(Object value, String defaultValue)
           
static Struct toStruct(Object o)
          cast a Object to a Struct Object
static Struct toStruct(Object o, boolean caseSensitive)
           
static Struct toStruct(Object o, Struct defaultValue)
           
static Struct toStruct(Object o, Struct defaultValue, boolean caseSensitive)
          cast a Object to a Struct Object
static TimeSpan toTimespan(Object o)
          cast a Object to a TimeSpan Object (alias for toTimeSpan)
static TimeSpan toTimeSpan(Object o)
          cast a Object to a TimeSpan Object
static TimeSpan toTimespan(Object o, TimeSpan defaultValue)
          cast a Object to a TimeSpan Object (alias for toTimeSpan)
static TimeZone toTimeZone(String strTimeZone)
          casts a string to a TimeZone
static TimeZone toTimeZone(String strTimeZone, TimeZone defaultValue)
          casts a string to a TimeZone
static String toTypeName(Class clazz)
           
static String toTypeName(Object o)
          return the type name of a object (string, boolean, int aso.), type is not same like class name
static UDF toUDF(Object o)
           
static String toURL(Object o)
           
static String toURL(Object o, String defaultValue)
           
static Object toUUId(Object o)
          cast a Object to a UUID
static Object toUUId(Object o, Object defaultValue)
          cast a Object to a UUID
static String toVariableName(Object o)
          cast a Object to a Variable Name
static Object toVariableName(Object o, Object defaultValue)
          cast a Object to a Variable Name
static Vector toVetor(Object obj)
           
static Object toVoid(Object o)
          cast a value to void (Empty String)
static Object toVoid(Object o, Object defaultValue)
          cast a value to void (Empty String)
static Node toXML(Object value)
          cast Object to a XML Node
static Node toXML(Object value, Node defaultValue)
          cast Object to a XML Node
static String toZip(Object o)
           
static String toZip(Object o, String defaultValue)
           
static Object unwrap(Object value)
           
static Object unwrap(Object value, Object defaultValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toBooleanValue

public static boolean toBooleanValue(boolean b)
cast a boolean value to a boolean value (do nothing)

Parameters:
b - boolean value to cast
Returns:
casted boolean value

toBooleanValue

public static boolean toBooleanValue(int i)
cast a int value to a boolean value (primitive value type)

Parameters:
i - int value to cast
Returns:
casted boolean value

toBooleanValue

public static boolean toBooleanValue(long l)
cast a long value to a boolean value (primitive value type)

Parameters:
l - long value to cast
Returns:
casted boolean value

toBooleanValue

public static boolean toBooleanValue(double d)
cast a double value to a boolean value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted boolean value

toBooleanValue

public static boolean toBooleanValue(char c)
cast a double value to a boolean value (primitive value type)

Parameters:
c - char value to cast
Returns:
casted boolean value

toBooleanValue

public static boolean toBooleanValue(Object o)
                              throws PageException
cast a Object to a boolean value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted boolean value
Throws:
PageException

toBooleanValue

public static boolean toBooleanValue(Boolean b)
tranlate a Boolean object to a boolean value

Parameters:
b -
Returns:

toBooleanValue

public static boolean toBooleanValue(String str)
                              throws PageException
cast a Object to a boolean value (primitive value type)

Parameters:
str - String to cast
Returns:
casted boolean value
Throws:
PageException

toBoolean

public static Boolean toBoolean(String str,
                                Boolean defaultValue)

toDouble

public static Double toDouble(float f)
cast a Object to a Double Object (reference Type)

Parameters:
o - Object to cast
Returns:
casted Double Object
Throws:
PageException

toDouble

public static Double toDouble(Float f)

toDouble

public static Double toDouble(Object o)
                       throws PageException
cast a Object to a Double Object (reference Type)

Parameters:
o - Object to cast
Returns:
casted Double Object
Throws:
PageException

toDouble

public static Double toDouble(String str)
                       throws PageException
cast a Object to a Double Object (reference Type)

Parameters:
str - string to cast
Returns:
casted Double Object
Throws:
PageException

toDouble

public static Double toDouble(Object o,
                              Double defaultValue)
cast a Object to a Double Object (reference Type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Double Object

toDouble

public static Double toDouble(double d)

toDouble

public static Double toDouble(boolean b)
cast a boolean value to a Double Object (reference Type)

Parameters:
b - boolean value to cast
Returns:
casted Double Object

toDoubleValue

public static double toDoubleValue(Object o)
                            throws PageException
cast a Object to a double value (primitive value Type)

Parameters:
o - Object to cast
Returns:
casted double value
Throws:
PageException

toDoubleValue

public static double toDoubleValue(Double d)
                            throws PageException
Throws:
PageException

toDoubleValue

public static double toDoubleValue(String str)
                            throws CasterException
cast a Object to a double value (primitive value Type)

Parameters:
str - String to cast
Returns:
casted double value
Throws:
CasterException

toDoubleValue

public static double toDoubleValue(Object o,
                                   double defaultValue)
cast a Object to a double value (primitive value Type)

Parameters:
o - Object to cast
defaultValue - if can't cast return this value
Returns:
casted double value

toDoubleValue

public static double toDoubleValue(String str,
                                   double defaultValue)
cast a Object to a double value (primitive value Type), if can't return Double.NaN

Parameters:
str - String to cast
defaultValue - if can't cast return this value
Returns:
casted double value

toDoubleValue

public static double toDoubleValue(double d)
cast a double value to a double value (do nothing)

Parameters:
d - double value to cast
Returns:
casted double value

toDoubleValue

public static double toDoubleValue(float f)

toDoubleValue

public static double toDoubleValue(Float f)

toDoubleValue

public static double toDoubleValue(boolean b)
cast a boolean value to a double value (primitive value type)

Parameters:
b - boolean value to cast
Returns:
casted double value

toDoubleValue

public static double toDoubleValue(char c)
cast a char value to a double value (primitive value type)

Parameters:
c - char value to cast
Returns:
casted double value

toIntValue

public static int toIntValue(Object o)
                      throws PageException
cast a Object to a int value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted int value
Throws:
PageException

toIntValue

public static int toIntValue(Object o,
                             int defaultValue)
cast a Object to a int value (primitive value type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted int value

toIntValue

public static int toIntValue(String str)
                      throws ExpressionException
cast a String to a int value (primitive value type)

Parameters:
str - String to cast
Returns:
casted int value
Throws:
ExpressionException

toIntValue

public static int toIntValue(String str,
                             int defaultValue)
cast a Object to a double value (primitive value Type), if can't return Integer.MIN_VALUE

Parameters:
str - String to cast
defaultValue -
Returns:
casted double value

toIntValue

public static int toIntValue(double d)
cast a double value to a int value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted int value

toIntValue

public static int toIntValue(int i)
cast a int value to a int value (do nothing)

Parameters:
i - int value to cast
Returns:
casted int value

toIntValue

public static int toIntValue(boolean b)
cast a boolean value to a int value (primitive value type)

Parameters:
b - boolean value to cast
Returns:
casted int value

toIntValue

public static int toIntValue(char c)
cast a char value to a int value (primitive value type)

Parameters:
c - char value to cast
Returns:
casted int value

toDecimal

public static String toDecimal(boolean value)
cast a double to a decimal value (String:xx.xx)

Parameters:
value - Object to cast
Returns:
casted decimal value

toDecimal

public static String toDecimal(Object value)
                        throws PageException
cast a double to a decimal value (String:xx.xx)

Parameters:
value - Object to cast
Returns:
casted decimal value
Throws:
PageException

toDecimal

public static String toDecimal(String value)
                        throws PageException
cast a double to a decimal value (String:xx.xx)

Parameters:
value - Object to cast
Returns:
casted decimal value
Throws:
PageException

toDecimal

public static String toDecimal(Object value,
                               String defaultValue)
cast a double to a decimal value (String:xx.xx)

Parameters:
value - Object to cast
defaultValue -
Returns:
casted decimal value

toDecimal

public static String toDecimal(double value)
cast a Oject to a decimal value (String:xx.xx)

Parameters:
value - Object to cast
Returns:
casted decimal value

toBoolean

public static Boolean toBoolean(boolean b)
cast a boolean value to a Boolean Object(reference type)

Parameters:
b - boolean value to cast
Returns:
casted Boolean Object

toBoolean

public static Boolean toBoolean(char c)
cast a char value to a Boolean Object(reference type)

Parameters:
c - char value to cast
Returns:
casted Boolean Object

toBoolean

public static Boolean toBoolean(int i)
cast a int value to a Boolean Object(reference type)

Parameters:
i - int value to cast
Returns:
casted Boolean Object

toBoolean

public static Boolean toBoolean(long l)
cast a long value to a Boolean Object(reference type)

Parameters:
l - long value to cast
Returns:
casted Boolean Object

toBoolean

public static Boolean toBoolean(double d)
cast a double value to a Boolean Object(reference type)

Parameters:
d - double value to cast
Returns:
casted Boolean Object

toBoolean

public static Boolean toBoolean(Object o)
                         throws PageException
cast a Object to a Boolean Object(reference type)

Parameters:
o - Object to cast
Returns:
casted Boolean Object
Throws:
PageException

toBoolean

public static Boolean toBoolean(String str)
                         throws PageException
cast a Object to a Boolean Object(reference type)

Parameters:
str - String to cast
Returns:
casted Boolean Object
Throws:
PageException

toBooleanValue

public static boolean toBooleanValue(Object o,
                                     boolean defaultValue)
cast a Object to a boolean value (primitive value type), Exception Less

Parameters:
o - Object to cast
defaultValue -
Returns:
casted boolean value

toBoolean

public static Boolean toBoolean(Object o,
                                Boolean defaultValue)
cast a Object to a boolean value (refrence type), Exception Less

Parameters:
o - Object to cast
defaultValue - default value
Returns:
casted boolean reference

toCharValue

public static char toCharValue(boolean b)
cast a boolean value to a char value

Parameters:
b - boolean value to cast
Returns:
casted char value

toCharValue

public static char toCharValue(double d)
cast a double value to a char value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted char value

toCharValue

public static char toCharValue(char c)
cast a char value to a char value (do nothing)

Parameters:
c - char value to cast
Returns:
casted char value

toCharValue

public static char toCharValue(Object o)
                        throws PageException
cast a Object to a char value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted char value
Throws:
PageException

toCharValue

public static char toCharValue(String str)
                        throws PageException
cast a Object to a char value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted char value
Throws:
PageException

toCharValue

public static char toCharValue(Object o,
                               char defaultValue)
cast a Object to a char value (primitive value type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted char value

toCharacter

public static Character toCharacter(boolean b)
cast a boolean value to a Character Object(reference type)

Parameters:
b - boolean value to cast
Returns:
casted Character Object

toCharacter

public static Character toCharacter(char c)
cast a char value to a Character Object(reference type)

Parameters:
c - char value to cast
Returns:
casted Character Object

toCharacter

public static Character toCharacter(double d)
cast a double value to a Character Object(reference type)

Parameters:
d - double value to cast
Returns:
casted Character Object

toCharacter

public static Character toCharacter(Object o)
                             throws PageException
cast a Object to a Character Object(reference type)

Parameters:
o - Object to cast
Returns:
casted Character Object
Throws:
PageException

toCharacter

public static Character toCharacter(String str)
                             throws PageException
cast a Object to a Character Object(reference type)

Parameters:
str - Object to cast
Returns:
casted Character Object
Throws:
PageException

toCharacter

public static Character toCharacter(Object o,
                                    Character defaultValue)
cast a Object to a Character Object(reference type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Character Object

toByteValue

public static byte toByteValue(boolean b)
cast a boolean value to a byte value

Parameters:
b - boolean value to cast
Returns:
casted byte value

toByteValue

public static byte toByteValue(double d)
cast a double value to a byte value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted byte value

toByteValue

public static byte toByteValue(char c)
cast a char value to a byte value (do nothing)

Parameters:
c - char value to cast
Returns:
casted byte value

toByteValue

public static byte toByteValue(Object o)
                        throws PageException
cast a Object to a byte value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted byte value
Throws:
PageException
CasterException

toByteValue

public static byte toByteValue(String str)
                        throws PageException
cast a Object to a byte value (primitive value type)

Parameters:
str - Object to cast
Returns:
casted byte value
Throws:
PageException
CasterException

toByteValue

public static byte toByteValue(Object o,
                               byte defaultValue)
cast a Object to a byte value (primitive value type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted byte value

toByte

public static Byte toByte(boolean b)
cast a boolean value to a Byte Object(reference type)

Parameters:
b - boolean value to cast
Returns:
casted Byte Object

toByte

public static Byte toByte(char c)
cast a char value to a Byte Object(reference type)

Parameters:
c - char value to cast
Returns:
casted Byte Object

toByte

public static Byte toByte(double d)
cast a double value to a Byte Object(reference type)

Parameters:
d - double value to cast
Returns:
casted Byte Object

toByte

public static Byte toByte(Object o)
                   throws PageException
cast a Object to a Byte Object(reference type)

Parameters:
o - Object to cast
Returns:
casted Byte Object
Throws:
PageException

toByte

public static Byte toByte(String str)
                   throws PageException
cast a Object to a Byte Object(reference type)

Parameters:
str - String to cast
Returns:
casted Byte Object
Throws:
PageException

toByte

public static Byte toByte(Object o,
                          Byte defaultValue)
cast a Object to a Byte Object(reference type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Byte Object

toLongValue

public static long toLongValue(boolean b)
cast a boolean value to a long value

Parameters:
b - boolean value to cast
Returns:
casted long value

toLongValue

public static long toLongValue(double d)
cast a double value to a long value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted long value

toLongValue

public static long toLongValue(char c)
cast a char value to a long value (do nothing)

Parameters:
c - char value to cast
Returns:
casted long value

toLongValue

public static long toLongValue(Object o)
                        throws PageException
cast a Object to a long value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted long value
Throws:
PageException

toLongValue

public static long toLongValue(String str)
                        throws PageException
cast a Object to a long value (primitive value type)

Parameters:
str - Object to cast
Returns:
casted long value
Throws:
PageException

toLongValue

public static long toLongValue(Object o,
                               long defaultValue)
cast a Object to a long value (primitive value type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted long value

toLong

public static Long toLong(boolean b)
cast a boolean value to a Long Object(reference type)

Parameters:
b - boolean value to cast
Returns:
casted Long Object

toLong

public static Long toLong(char c)
cast a char value to a Long Object(reference type)

Parameters:
c - char value to cast
Returns:
casted Long Object

toLong

public static Long toLong(double d)
cast a double value to a Long Object(reference type)

Parameters:
d - double value to cast
Returns:
casted Long Object

toLong

public static Long toLong(Object o)
                   throws PageException
cast a Object to a Long Object(reference type)

Parameters:
o - Object to cast
Returns:
casted Long Object
Throws:
PageException

toLong

public static Long toLong(String str)
                   throws PageException
cast a Object to a Long Object(reference type)

Parameters:
str - Object to cast
Returns:
casted Long Object
Throws:
PageException

toLong

public static Long toLong(long l)
cast a long to a Long Object(reference type)

Parameters:
l - long to cast
Returns:
casted Long Object

toLong

public static Long toLong(Object o,
                          Long defaultValue)
cast a Object to a Long Object(reference type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Long Object

toFloat

public static Float toFloat(boolean b)
cast a boolean value to a Float Object(reference type)

Parameters:
b - boolean value to cast
Returns:
casted Float Object

toFloat

public static Float toFloat(char c)
cast a char value to a Float Object(reference type)

Parameters:
c - char value to cast
Returns:
casted Float Object

toFloat

public static Float toFloat(double d)
cast a double value to a Float Object(reference type)

Parameters:
d - double value to cast
Returns:
casted Float Object

toFloat

public static Float toFloat(Object o)
                     throws PageException
cast a Object to a Float Object(reference type)

Parameters:
o - Object to cast
Returns:
casted Float Object
Throws:
PageException

toFloat

public static Float toFloat(String str)
                     throws PageException
cast a Object to a Float Object(reference type)

Parameters:
str - Object to cast
Returns:
casted Float Object
Throws:
PageException

toFloat

public static Float toFloat(Object o,
                            Float defaultValue)
cast a Object to a Float Object(reference type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Float Object

toFloatValue

public static float toFloatValue(boolean b)
cast a boolean value to a float value

Parameters:
b - boolean value to cast
Returns:
casted long value

toFloatValue

public static float toFloatValue(double d)
cast a double value to a long value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted long value

toFloatValue

public static float toFloatValue(char c)
cast a char value to a long value (do nothing)

Parameters:
c - char value to cast
Returns:
casted long value

toFloatValue

public static float toFloatValue(Object o)
                          throws PageException
cast a Object to a long value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted long value
Throws:
PageException

toFloatValue

public static float toFloatValue(String str)
                          throws PageException
cast a Object to a long value (primitive value type)

Parameters:
str - Object to cast
Returns:
casted long value
Throws:
PageException

toFloatValue

public static float toFloatValue(Object o,
                                 float defaultValue)
cast a Object to a float value (primitive value type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted float value

toShortValue

public static short toShortValue(boolean b)
cast a boolean value to a short value

Parameters:
b - boolean value to cast
Returns:
casted short value

toShortValue

public static short toShortValue(double d)
cast a double value to a short value (primitive value type)

Parameters:
d - double value to cast
Returns:
casted short value

toShortValue

public static short toShortValue(char c)
cast a char value to a short value (do nothing)

Parameters:
c - char value to cast
Returns:
casted short value

toShortValue

public static short toShortValue(Object o)
                          throws PageException
cast a Object to a short value (primitive value type)

Parameters:
o - Object to cast
Returns:
casted short value
Throws:
PageException

toShortValue

public static short toShortValue(String str)
                          throws PageException
cast a Object to a short value (primitive value type)

Parameters:
str - Object to cast
Returns:
casted short value
Throws:
PageException

toShortValue

public static short toShortValue(Object o,
                                 short defaultValue)
cast a Object to a short value (primitive value type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted short value

toShort

public static Short toShort(boolean b)
cast a boolean value to a Short Object(reference type)

Parameters:
b - boolean value to cast
Returns:
casted Short Object

toShort

public static Short toShort(char c)
cast a char value to a Short Object(reference type)

Parameters:
c - char value to cast
Returns:
casted Short Object

toShort

public static Short toShort(double d)
cast a double value to a Byte Object(reference type)

Parameters:
d - double value to cast
Returns:
casted Byte Object

toShort

public static Short toShort(Object o)
                     throws PageException
cast a Object to a Byte Object(reference type)

Parameters:
o - Object to cast
Returns:
casted Byte Object
Throws:
PageException

toShort

public static Short toShort(String str)
                     throws PageException
cast a Object to a Byte Object(reference type)

Parameters:
str - Object to cast
Returns:
casted Byte Object
Throws:
PageException

toShort

public static Short toShort(Object o,
                            Short defaultValue)
cast a Object to a Byte Object(reference type)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Byte Object

stringToBooleanValue

public static boolean stringToBooleanValue(String str)
                                    throws ExpressionException
cast a String to a boolean value (primitive value type)

Parameters:
str - String to cast
Returns:
casted boolean value
Throws:
ExpressionException

stringToBooleanValueEL

public static int stringToBooleanValueEL(String str)
cast a String to a boolean value (primitive value type), return 1 for true, 0 for false and -1 if can't cast to a boolean type

Parameters:
str - String to cast
Returns:
casted boolean value

toString

public static String toString(Object o)
                       throws PageException
cast a Object to a String

Parameters:
o - Object to cast
Returns:
casted String
Throws:
PageException

toString

public static String toString(String str)
cast a String to a String (do Nothing)

Parameters:
o - Object to cast
Returns:
casted String
Throws:
PageException

toStringBuffer

public static StringBuffer toStringBuffer(Object obj)
                                   throws PageException
Throws:
PageException

toKey

public static Collection.Key toKey(Object o)
                            throws CasterException
Throws:
CasterException

toKey

public static Collection.Key toKey(Object o,
                                   Collection.Key defaultValue)

toString

public static String toString(Object o,
                              String defaultValue)
cast a Object to a String dont throw a exception, if can't cast to a string return a empty string

Parameters:
o - Object to cast
defaultValue -
Returns:
casted String

toString3

public static String toString3(double d)
cast a double value to a String

Parameters:
d - double value to cast
Returns:
casted String

toString

public static String toString(double d)

toString

public static String toString(long l)
cast a long value to a String

Parameters:
l - long value to cast
Returns:
casted String

toString

public static String toString(int i)
cast a int value to a String

Parameters:
i - int value to cast
Returns:
casted String

toString

public static String toString(boolean b)
cast a boolean value to a String

Parameters:
b - boolean value to cast
Returns:
casted String

toList

public static List toList(Object o)
                   throws PageException
cast a Object to a Array Object

Parameters:
o - Object to cast
Returns:
casted Array
Throws:
PageException

toList

public static List toList(Object o,
                          List defaultValue)
cast a Object to a Array Object

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Array

toList

public static List toList(Object o,
                          boolean duplicate,
                          List defaultValue)
cast a Object to a Array Object

Parameters:
o - Object to cast
duplicate -
defaultValue -
Returns:
casted Array

toList

public static List toList(Object o,
                          boolean duplicate)
                   throws PageException
cast a Object to a Array Object

Parameters:
o - Object to cast
duplicate -
Returns:
casted Array
Throws:
PageException

toArray

public static Array toArray(Object o)
                     throws PageException
cast a Object to a Array Object

Parameters:
o - Object to cast
Returns:
casted Array
Throws:
PageException

toNativeArray

public static Object[] toNativeArray(Object o)
                              throws PageException
Throws:
PageException

toArray

public static Array toArray(Object o,
                            Array defaultValue)
cast a Object to a Array Object

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Array

toMap

public static Map toMap(Object o)
                 throws PageException
cast a Object to a Map Object

Parameters:
o - Object to cast
Returns:
casted Struct
Throws:
PageException

toMap

public static Map toMap(Object o,
                        Map defaultValue)
cast a Object to a Map Object

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Struct

toMap

public static Map toMap(Object o,
                        boolean duplicate,
                        Map defaultValue)
cast a Object to a Map Object

Parameters:
o - Object to cast
duplicate -
defaultValue -
Returns:
casted Struct

toMap

public static Map toMap(Object o,
                        boolean duplicate)
                 throws PageException
cast a Object to a Map Object

Parameters:
o - Object to cast
duplicate -
Returns:
casted Struct
Throws:
PageException

toStruct

public static Struct toStruct(Object o,
                              Struct defaultValue,
                              boolean caseSensitive)
cast a Object to a Struct Object

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Struct

toStruct

public static Struct toStruct(Object o)
                       throws PageException
cast a Object to a Struct Object

Parameters:
o - Object to cast
Returns:
casted Struct
Throws:
PageException

toStruct

public static Struct toStruct(Object o,
                              Struct defaultValue)

toStruct

public static Struct toStruct(Object o,
                              boolean caseSensitive)
                       throws PageException
Throws:
PageException

toBinary

public static byte[] toBinary(Object o)
                       throws PageException
cast a Object to a Binary

Parameters:
o - Object to cast
Returns:
casted Binary
Throws:
PageException

toBinary

public static byte[] toBinary(Object o,
                              byte[] defaultValue)
cast a Object to a Binary

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Binary

toCreditCard

public static Object toCreditCard(Object o)
                           throws PageException
Throws:
PageException

toCreditCard

public static Object toCreditCard(Object o,
                                  String defaultValue)

toBase64

public static String toBase64(Object o,
                              String charset)
                       throws PageException
cast a Object to a Base64 value

Parameters:
o - Object to cast
Returns:
to Base64 String
Throws:
PageException

toBase64

public static String toBase64(Object o,
                              String charset,
                              String defaultValue)
cast a Object to a Base64 value

Parameters:
o - Object to cast
defaultValue -
Returns:
to Base64 String

toB64

public static String toB64(String str,
                           String charset)
                    throws CoderException,
                           UnsupportedEncodingException
Throws:
CoderException
UnsupportedEncodingException

toB64

public static String toB64(byte[] b)
                    throws CoderException
Throws:
CoderException

toB64

public static String toB64(String str,
                           String charset,
                           String defaultValue)

toB64

public static String toB64(byte[] b,
                           String defaultValue)

toDate

public static DateTime toDate(boolean b,
                              TimeZone tz)
cast a boolean to a DateTime Object

Parameters:
b - boolean to cast
tz -
Returns:
casted DateTime Object

toDate

public static DateTime toDate(char c,
                              TimeZone tz)
cast a char to a DateTime Object

Parameters:
c - char to cast
tz -
Returns:
casted DateTime Object

toDate

public static DateTime toDate(double d,
                              TimeZone tz)
cast a double to a DateTime Object

Parameters:
d - double to cast
tz -
Returns:
casted DateTime Object

toDate

public static DateTime toDate(Object o,
                              TimeZone tz)
                       throws PageException
cast a Object to a DateTime Object

Parameters:
o - Object to cast
tz -
Returns:
casted DateTime Object
Throws:
PageException

toDate

public static DateTime toDate(String str,
                              TimeZone tz)
                       throws PageException
cast a Object to a DateTime Object

Parameters:
str - String to cast
tz -
Returns:
casted DateTime Object
Throws:
PageException

toDate

public static DateTime toDate(Object o,
                              boolean alsoNumbers,
                              TimeZone tz)
                       throws PageException
cast a Object to a DateTime Object

Parameters:
o - Object to cast
alsoNumbers - define if also numbers will casted to a datetime value
tz -
Returns:
casted DateTime Object
Throws:
PageException

toDate

public static DateTime toDate(Object o,
                              boolean alsoNumbers,
                              TimeZone tz,
                              DateTime defaultValue)
cast a Object to a DateTime Object

Parameters:
o - Object to cast
alsoNumbers - define if also numbers will casted to a datetime value
tz -
defaultValue -
Returns:
casted DateTime Object

toDate

public static DateTime toDate(String str,
                              boolean alsoNumbers,
                              TimeZone tz,
                              DateTime defaultValue)
cast a Object to a DateTime Object

Parameters:
str - String to cast
alsoNumbers - define if also numbers will casted to a datetime value
tz -
defaultValue -
Returns:
casted DateTime Object

toDateTime

public static DateTime toDateTime(Object o,
                                  TimeZone tz)
                           throws PageException
cast a Object to a DateTime Object

Parameters:
o - Object to cast
tz -
Returns:
casted DateTime Object
Throws:
PageException

toDatetime

public static DateTime toDatetime(Object o,
                                  TimeZone tz)
                           throws PageException
cast a Object to a DateTime Object (alias for toDateTime)

Parameters:
o - Object to cast
tz -
Returns:
casted DateTime Object
Throws:
PageException

toDateTime

public static DateTime toDateTime(Locale locale,
                                  String str,
                                  TimeZone tz,
                                  boolean useCommomDateParserAsWell)
                           throws PageException
parse a string to a Datetime Object

Parameters:
locale -
str - String representation of a locale Date
tz -
Returns:
DateTime Object
Throws:
PageException

toDateTime

public static DateTime toDateTime(Locale locale,
                                  String str,
                                  TimeZone tz,
                                  DateTime defaultValue,
                                  boolean useCommomDateParserAsWell)
parse a string to a Datetime Object, returns null if can't convert

Parameters:
locale -
str - String representation of a locale Date
tz -
defaultValue -
Returns:
datetime object

toQuery

public static Query toQuery(Object o)
                     throws PageException
cast a Object to a Query Object

Parameters:
o - Object to cast
Returns:
casted Query Object
Throws:
PageException

toQueryPro

public static QueryPro toQueryPro(Query q)
                           throws CasterException
Throws:
CasterException

toQueryPro

public static QueryPro toQueryPro(Query q,
                                  QueryPro defaultValue)

toQuery

public static Query toQuery(Object o,
                            Query defaultValue)
cast a Object to a Query Object

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Query Object

toQuery

public static Query toQuery(Object o,
                            boolean duplicate,
                            Query defaultValue)
cast a Object to a Query Object

Parameters:
o - Object to cast
duplicate - duplicate the object or not
defaultValue -
Returns:
casted Query Object

toQuery

public static Query toQuery(Object o,
                            boolean duplicate)
                     throws PageException
cast a Object to a Query Object

Parameters:
o - Object to cast
duplicate - duplicate the object or not
Returns:
casted Query Object
Throws:
PageException

toUUId

public static Object toUUId(Object o)
                     throws PageException
cast a Object to a UUID

Parameters:
o - Object to cast
Returns:
casted Query Object
Throws:
PageException

toUUId

public static Object toUUId(Object o,
                            Object defaultValue)
cast a Object to a UUID

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Query Object

toGUId

public static Object toGUId(Object o)
                     throws PageException
cast a Object to a GUID

Parameters:
o - Object to cast
Returns:
casted Query Object
Throws:
PageException

toGUId

public static Object toGUId(Object o,
                            Object defaultValue)
cast a Object to a GUID

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Query Object

toVariableName

public static String toVariableName(Object o)
                             throws PageException
cast a Object to a Variable Name

Parameters:
o - Object to cast
Returns:
casted Variable Name
Throws:
PageException

toVariableName

public static Object toVariableName(Object o,
                                    Object defaultValue)
cast a Object to a Variable Name

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Variable Name

toTimeSpan

public static TimeSpan toTimeSpan(Object o)
                           throws PageException
cast a Object to a TimeSpan Object

Parameters:
o - Object to cast
Returns:
casted TimeSpan Object
Throws:
PageException

toTimespan

public static TimeSpan toTimespan(Object o,
                                  TimeSpan defaultValue)
cast a Object to a TimeSpan Object (alias for toTimeSpan)

Parameters:
o - Object to cast
defaultValue -
Returns:
casted TimeSpan Object

toTimespan

public static TimeSpan toTimespan(Object o)
                           throws PageException
cast a Object to a TimeSpan Object (alias for toTimeSpan)

Parameters:
o - Object to cast
Returns:
casted TimeSpan Object
Throws:
PageException

toPageException

public static PageException toPageException(Throwable t)
cast a Throwable Object to a PageException Object

Parameters:
t - Throwable to cast
Returns:
casted PageException Object

toTypeName

public static String toTypeName(Object o)
return the type name of a object (string, boolean, int aso.), type is not same like class name

Parameters:
o - Object to get type from
Returns:
type of the object

toTypeName

public static String toTypeName(Class clazz)

toClassName

public static String toClassName(Object o)

toClassName

public static String toClassName(Class clazz)

cfTypeToClass

public static Class cfTypeToClass(String type)
                           throws PageException
Throws:
PageException

castTo

public static Object castTo(PageContext pc,
                            String type,
                            Object o,
                            boolean alsoPattern)
                     throws PageException
cast a value to a value defined by type argument

Parameters:
pc -
type - type of the returning Value
o - Object to cast
Returns:
casted Value
Throws:
PageException

toZip

public static String toZip(Object o)
                    throws PageException
Throws:
PageException

toZip

public static String toZip(Object o,
                           String defaultValue)

toURL

public static String toURL(Object o)
                    throws PageException
Throws:
PageException

toURL

public static String toURL(Object o,
                           String defaultValue)

toPhone

public static String toPhone(Object o)
                      throws PageException
Throws:
PageException

toPhone

public static String toPhone(Object o,
                             String defaultValue)

toSSN

public static String toSSN(Object o)
                    throws PageException
Throws:
PageException

toSSN

public static String toSSN(Object o,
                           String defaultValue)

toEmail

public static String toEmail(Object o)
                      throws PageException
Throws:
PageException

toEmail

public static String toEmail(Object o,
                             String defaultValue)

castTo

public static Object castTo(PageContext pc,
                            short type,
                            String strType,
                            Object o)
                     throws PageException
cast a value to a value defined by type argument

Parameters:
pc -
type - type of the returning Value
strType - type as String
o - Object to cast
Returns:
casted Value
Throws:
PageException

castTo

public static Object castTo(PageContext pc,
                            short type,
                            Object o)
                     throws PageException
cast a value to a value defined by type argument

Parameters:
pc -
type - type of the returning Value
o - Object to cast
Returns:
casted Value
Throws:
PageException

toVoid

public static Object toVoid(Object o)
                     throws ExpressionException
cast a value to void (Empty String)

Parameters:
o -
Returns:
void value
Throws:
ExpressionException

toVoid

public static Object toVoid(Object o,
                            Object defaultValue)
cast a value to void (Empty String)

Parameters:
o -
defaultValue -
Returns:
void value

toRef

public static Object toRef(Object o)
cast a Object to a reference type (Object), in that case this method to nothing, because a Object is already a reference type

Parameters:
o - Object to cast
Returns:
casted Object

toRef

public static String toRef(String o)
cast a String to a reference type (Object), in that case this method to nothing, because a String is already a reference type

Parameters:
o - Object to cast
Returns:
casted Object

toRef

public static Collection toRef(Collection o)
cast a Collection to a reference type (Object), in that case this method to nothing, because a Collection is already a reference type

Parameters:
o - Collection to cast
Returns:
casted Object

toRef

public static String toRef(char c)
cast a char value to his (CFML) reference type String

Parameters:
c - char to cast
Returns:
casted String

toRef

public static Boolean toRef(boolean b)
cast a boolean value to his (CFML) reference type Boolean

Parameters:
b - boolean to cast
Returns:
casted Boolean

toRef

public static Byte toRef(byte b)
cast a byte value to his (CFML) reference type Integer

Parameters:
b - byte to cast
Returns:
casted Integer

toRef

public static Integer toRef(int i)
cast a int value to his (CFML) reference type Integer

Parameters:
i - int to cast
Returns:
casted Integer

toRef

public static Float toRef(float f)
cast a float value to his (CFML) reference type Float

Parameters:
f - float to cast
Returns:
casted Float

toRef

public static Long toRef(long l)
cast a long value to his (CFML) reference type Long

Parameters:
l - long to cast
Returns:
casted Long

toRef

public static Double toRef(double d)
cast a double value to his (CFML) reference type Double

Parameters:
d - doble to cast
Returns:
casted Double

toRef

public static Short toRef(short s)
cast a double value to his (CFML) reference type Double

Parameters:
s - short to cast
Returns:
casted Short

toIterator

public static Iterator toIterator(Object o)
                           throws PageException
cast a Object to a Iterator or get Iterator from Object

Parameters:
o - Object to cast
Returns:
casted Collection
Throws:
PageException

toCollection

public static Collection toCollection(Object o)
                               throws PageException
cast a Object to a Collection

Parameters:
o - Object to cast
Returns:
casted Collection
Throws:
PageException

toJavaCollection

public static Collection toJavaCollection(Object o)
                                   throws PageException
Throws:
PageException

toComponent

public static Component toComponent(Object o)
                             throws PageException
cast a Object to a Component

Parameters:
o - Object to cast
Returns:
casted Component
Throws:
PageException

toComponent

public static Component toComponent(Object o,
                                    Component defaultValue)

toCollection

public static Collection toCollection(Object o,
                                      Collection defaultValue)
cast a Object to a Collection, if not returns null

Parameters:
o - Object to cast
defaultValue -
Returns:
casted Collection

toFile

public static File toFile(Object obj)
                   throws PageException
convert a object to a File

Parameters:
obj -
Returns:
File
Throws:
PageException

toFile

public static File toFile(Object obj,
                          File defaultValue)
convert a object to a File

Parameters:
obj -
defaultValue -
Returns:
File

toFunctionValues

public static Struct toFunctionValues(Object[] args)
                               throws ExpressionException
convert a object array to a HashMap filled with Function value Objects

Parameters:
args - Object array to convert
Returns:
hashmap containing Function values
Throws:
ExpressionException

toFunctionValues

public static Struct toFunctionValues(Object[] args,
                                      int offset,
                                      int len)
                               throws ExpressionException
Throws:
ExpressionException

toFunctionValues

public static Object[] toFunctionValues(Struct args)

toLocale

public static Locale toLocale(String strLocale)
                       throws ExpressionException
casts a string to a Locale

Parameters:
strLocale -
Returns:
Locale from String
Throws:
ExpressionException

toLocale

public static Locale toLocale(String strLocale,
                              Locale defaultValue)
casts a string to a Locale

Parameters:
strLocale -
defaultValue -
Returns:
Locale from String

toTimeZone

public static TimeZone toTimeZone(String strTimeZone)
                           throws ExpressionException
casts a string to a TimeZone

Parameters:
strTimeZone -
Returns:
TimeZone from String
Throws:
ExpressionException

toTimeZone

public static TimeZone toTimeZone(String strTimeZone,
                                  TimeZone defaultValue)
casts a string to a TimeZone

Parameters:
strTimeZone -
defaultValue -
Returns:
TimeZone from String

toNodeList

public static NodeList toNodeList(Object o)
                           throws PageException
casts a Object to a Node List

Parameters:
o - Object to Cast
Returns:
NodeList from Object
Throws:
PageException

toNodeList

public static NodeList toNodeList(Object o,
                                  NodeList defaultValue)
casts a Object to a Node List

Parameters:
o - Object to Cast
defaultValue -
Returns:
NodeList from Object

toNode

public static Node toNode(Object o)
                   throws PageException
casts a Object to a XML Node

Parameters:
o - Object to Cast
Returns:
Node from Object
Throws:
PageException

toNode

public static Node toNode(Object o,
                          Node defaultValue)
casts a Object to a XML Node

Parameters:
o - Object to Cast
defaultValue -
Returns:
Node from Object

toInteger

public static Integer toInteger(boolean b)
casts a boolean to a Integer

Parameters:
b -
Returns:
Integer from boolean

toInteger

public static Integer toInteger(char c)
casts a char to a Integer

Parameters:
c -
Returns:
Integer from char

toInteger

public static Integer toInteger(double d)
casts a double to a Integer

Parameters:
d -
Returns:
Integer from double

toInteger

public static Integer toInteger(Object o)
                         throws PageException
casts a Object to a Integer

Parameters:
o - Object to cast to Integer
Returns:
Integer from Object
Throws:
PageException

toInteger

public static Integer toInteger(String str)
                         throws PageException
casts a Object to a Integer

Parameters:
str - Object to cast to Integer
Returns:
Integer from Object
Throws:
PageException

toInteger

public static Integer toInteger(int i)

toInteger

public static Integer toInteger(Object o,
                                Integer defaultValue)
casts a Object to a Integer

Parameters:
o - Object to cast to Integer
defaultValue -
Returns:
Integer from Object

toNull

public static Object toNull(Object value)
                     throws PageException
casts a Object to null

Parameters:
value -
Returns:
to null from Object
Throws:
PageException

toNull

public static Object toNull(Object value,
                            Object defaultValue)
casts a Object to null

Parameters:
value -
defaultValue -
Returns:
to null from Object

toXML

public static Node toXML(Object value,
                         Node defaultValue)
cast Object to a XML Node

Parameters:
value -
defaultValue -
Returns:
XML Node

toXML

public static Node toXML(Object value)
                  throws PageException
cast Object to a XML Node

Parameters:
value -
Returns:
XML Node
Throws:
PageException

toStringForce

public static String toStringForce(Object value,
                                   String defaultValue)

toResource

public static Resource toResource(Object src)
                           throws ExpressionException
Throws:
ExpressionException

toResource

public static Resource toResource(Object src,
                                  boolean existing)
                           throws ExpressionException
Throws:
ExpressionException

toResource

public static Resource toResource(PageContext pc,
                                  Object src,
                                  boolean existing)
                           throws ExpressionException
Throws:
ExpressionException

toResource

public static Resource toResource(PageContext pc,
                                  Object src,
                                  boolean existing,
                                  boolean allowRealpath)
                           throws ExpressionException
Throws:
ExpressionException

toResource

public static Resource toResource(Config config,
                                  Object src,
                                  boolean existing)
                           throws ExpressionException
Throws:
ExpressionException

toHashtable

public static Hashtable toHashtable(Object obj)
                             throws PageException
Throws:
PageException

toVetor

public static Vector toVetor(Object obj)
                      throws PageException
Throws:
PageException

toCalendar

public static Calendar toCalendar(Date date,
                                  TimeZone tz)

toCalendar

public static Calendar toCalendar(long time,
                                  TimeZone tz)

toSerializable

public static Serializable toSerializable(Object object)
                                   throws CasterException
Throws:
CasterException

toSerializable

public static Serializable toSerializable(Object object,
                                          Serializable defaultValue)

toBytes

public static byte[] toBytes(Object obj)
                      throws PageException
Throws:
PageException

toBinaryStream

public static InputStream toBinaryStream(Object obj)
                                  throws PageException
Throws:
PageException

castTo

public static Object castTo(PageContext pc,
                            Class trgClass,
                            Object obj)
                     throws PageException
Throws:
PageException

toObjects

public static Objects toObjects(PageContext pc,
                                Object obj)
                         throws PageException
Throws:
PageException

toUDF

public static UDF toUDF(Object o)
                 throws CasterException
Throws:
CasterException

toBigDecimal

public static BigDecimal toBigDecimal(Object o)
                               throws PageException
Throws:
PageException

unwrap

public static Object unwrap(Object value)
                     throws PageException
Throws:
PageException

unwrap

public static Object unwrap(Object value,
                            Object defaultValue)

toCharSequence

public static CharSequence toCharSequence(Object obj)
                                   throws PageException
Throws:
PageException

toCharSequence

public static CharSequence toCharSequence(Object obj,
                                          CharSequence defaultValue)


Copyright © 2012 Railo