|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.runtime.op.Caster
public final class Caster
This class can cast object of one type to a other by CFML 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 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(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,
boolean alsoFromDate)
|
static double |
toDoubleValue(String str,
boolean alsoFromDate,
double defaultValue)
|
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 UDF |
toFunction(Object o)
|
static UDF |
toFunction(Object o,
UDF defaultValue)
|
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 InputStream |
toInputStream(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 OutputStream |
toOutputStream(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 QueryColumn |
toQueryColumn(Object o)
converts a object to a QueryColumn, if possible |
static QueryColumn |
toQueryColumn(Object o,
PageContext pc)
converts a object to a QueryColumn, if possible, also variable declarations are allowed. |
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(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(Object oTimeZone,
TimeZone defaultValue)
|
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 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 |
---|
public static boolean toBooleanValue(boolean b)
b
- boolean value to cast
public static boolean toBooleanValue(int i)
i
- int value to cast
public static boolean toBooleanValue(long l)
l
- long value to cast
public static boolean toBooleanValue(double d)
d
- double value to cast
public static boolean toBooleanValue(char c)
c
- char value to cast
public static boolean toBooleanValue(Object o) throws PageException
o
- Object to cast
PageException
public static boolean toBooleanValue(Boolean b)
b
-
public static boolean toBooleanValue(String str) throws PageException
str
- String to cast
PageException
public static Boolean toBoolean(String str, Boolean defaultValue)
public static Double toDouble(float f)
o
- Object to cast
PageException
public static Double toDouble(Float f)
public static Double toDouble(Object o) throws PageException
o
- Object to cast
PageException
public static Double toDouble(String str) throws PageException
str
- string to cast
PageException
public static Double toDouble(Object o, Double defaultValue)
o
- Object to castdefaultValue
-
public static Double toDouble(double d)
public static Double toDouble(boolean b)
b
- boolean value to cast
public static double toDoubleValue(Object o) throws PageException
o
- Object to cast
PageException
public static double toDoubleValue(Double d)
public static double toDoubleValue(String str) throws CasterException
str
- String to cast
CasterException
public static double toDoubleValue(String str, boolean alsoFromDate) throws CasterException
CasterException
public static double toDoubleValue(Object o, double defaultValue)
o
- Object to castdefaultValue
- if can't cast return this value
public static double toDoubleValue(String str, double defaultValue)
str
- String to castdefaultValue
- if can't cast return this value
public static double toDoubleValue(String str, boolean alsoFromDate, double defaultValue)
public static double toDoubleValue(double d)
d
- double value to cast
public static double toDoubleValue(float f)
public static double toDoubleValue(Float f)
public static double toDoubleValue(boolean b)
b
- boolean value to cast
public static double toDoubleValue(char c)
c
- char value to cast
public static int toIntValue(Object o) throws PageException
o
- Object to cast
PageException
public static int toIntValue(Object o, int defaultValue)
o
- Object to castdefaultValue
-
public static int toIntValue(String str) throws ExpressionException
str
- String to cast
ExpressionException
public static int toIntValue(String str, int defaultValue)
str
- String to castdefaultValue
-
public static int toIntValue(double d)
d
- double value to cast
public static int toIntValue(int i)
i
- int value to cast
public static int toIntValue(boolean b)
b
- boolean value to cast
public static int toIntValue(char c)
c
- char value to cast
public static String toDecimal(boolean value)
value
- Object to cast
public static String toDecimal(Object value) throws PageException
value
- Object to cast
PageException
public static String toDecimal(String value) throws PageException
value
- Object to cast
PageException
public static String toDecimal(Object value, String defaultValue)
value
- Object to castdefaultValue
-
public static String toDecimal(double value)
value
- Object to cast
public static Boolean toBoolean(boolean b)
b
- boolean value to cast
public static Boolean toBoolean(char c)
c
- char value to cast
public static Boolean toBoolean(int i)
i
- int value to cast
public static Boolean toBoolean(long l)
l
- long value to cast
public static Boolean toBoolean(double d)
d
- double value to cast
public static Boolean toBoolean(Object o) throws PageException
o
- Object to cast
PageException
public static Boolean toBoolean(String str) throws PageException
str
- String to cast
PageException
public static boolean toBooleanValue(Object o, boolean defaultValue)
o
- Object to castdefaultValue
-
public static Boolean toBoolean(Object o, Boolean defaultValue)
o
- Object to castdefaultValue
- default value
public static char toCharValue(boolean b)
b
- boolean value to cast
public static char toCharValue(double d)
d
- double value to cast
public static char toCharValue(char c)
c
- char value to cast
public static char toCharValue(Object o) throws PageException
o
- Object to cast
PageException
public static char toCharValue(String str) throws PageException
o
- Object to cast
PageException
public static char toCharValue(Object o, char defaultValue)
o
- Object to castdefaultValue
-
public static Character toCharacter(boolean b)
b
- boolean value to cast
public static Character toCharacter(char c)
c
- char value to cast
public static Character toCharacter(double d)
d
- double value to cast
public static Character toCharacter(Object o) throws PageException
o
- Object to cast
PageException
public static Character toCharacter(String str) throws PageException
str
- Object to cast
PageException
public static Character toCharacter(Object o, Character defaultValue)
o
- Object to castdefaultValue
-
public static byte toByteValue(boolean b)
b
- boolean value to cast
public static byte toByteValue(double d)
d
- double value to cast
public static byte toByteValue(char c)
c
- char value to cast
public static byte toByteValue(Object o) throws PageException
o
- Object to cast
PageException
CasterException
public static byte toByteValue(String str) throws PageException
str
- Object to cast
PageException
CasterException
public static byte toByteValue(Object o, byte defaultValue)
o
- Object to castdefaultValue
-
public static Byte toByte(boolean b)
b
- boolean value to cast
public static Byte toByte(char c)
c
- char value to cast
public static Byte toByte(double d)
d
- double value to cast
public static Byte toByte(Object o) throws PageException
o
- Object to cast
PageException
public static Byte toByte(String str) throws PageException
str
- String to cast
PageException
public static Byte toByte(Object o, Byte defaultValue)
o
- Object to castdefaultValue
-
public static long toLongValue(boolean b)
b
- boolean value to cast
public static long toLongValue(double d)
d
- double value to cast
public static long toLongValue(char c)
c
- char value to cast
public static long toLongValue(Object o) throws PageException
o
- Object to cast
PageException
public static long toLongValue(String str) throws PageException
str
- Object to cast
PageException
public static long toLongValue(Object o, long defaultValue)
o
- Object to castdefaultValue
-
public static Long toLong(boolean b)
b
- boolean value to cast
public static Long toLong(char c)
c
- char value to cast
public static Long toLong(double d)
d
- double value to cast
public static Long toLong(Object o) throws PageException
o
- Object to cast
PageException
public static Long toLong(String str) throws PageException
str
- Object to cast
PageException
public static Long toLong(long l)
l
- long to cast
public static Long toLong(Object o, Long defaultValue)
o
- Object to castdefaultValue
-
public static Float toFloat(boolean b)
b
- boolean value to cast
public static Float toFloat(char c)
c
- char value to cast
public static Float toFloat(double d)
d
- double value to cast
public static Float toFloat(Object o) throws PageException
o
- Object to cast
PageException
public static Float toFloat(String str) throws PageException
str
- Object to cast
PageException
public static Float toFloat(Object o, Float defaultValue)
o
- Object to castdefaultValue
-
public static float toFloatValue(boolean b)
b
- boolean value to cast
public static float toFloatValue(double d)
d
- double value to cast
public static float toFloatValue(char c)
c
- char value to cast
public static float toFloatValue(Object o) throws PageException
o
- Object to cast
PageException
public static float toFloatValue(String str) throws PageException
str
- Object to cast
PageException
public static float toFloatValue(Object o, float defaultValue)
o
- Object to castdefaultValue
-
public static short toShortValue(boolean b)
b
- boolean value to cast
public static short toShortValue(double d)
d
- double value to cast
public static short toShortValue(char c)
c
- char value to cast
public static short toShortValue(Object o) throws PageException
o
- Object to cast
PageException
public static short toShortValue(String str) throws PageException
str
- Object to cast
PageException
public static short toShortValue(Object o, short defaultValue)
o
- Object to castdefaultValue
-
public static Short toShort(boolean b)
b
- boolean value to cast
public static Short toShort(char c)
c
- char value to cast
public static Short toShort(double d)
d
- double value to cast
public static Short toShort(Object o) throws PageException
o
- Object to cast
PageException
public static Short toShort(String str) throws PageException
str
- Object to cast
PageException
public static Short toShort(Object o, Short defaultValue)
o
- Object to castdefaultValue
-
public static boolean stringToBooleanValue(String str) throws ExpressionException
str
- String to cast
ExpressionException
public static int stringToBooleanValueEL(String str)
str
- String to cast
public static String toString(Object o) throws PageException
o
- Object to cast
PageException
public static String toString(String str)
o
- Object to cast
PageException
public static StringBuffer toStringBuffer(Object obj) throws PageException
PageException
public static Collection.Key toKey(Object o) throws CasterException
CasterException
public static Collection.Key toKey(Object o, Collection.Key defaultValue)
public static String toString(Object o, String defaultValue)
o
- Object to castdefaultValue
-
public static String toString3(double d)
d
- double value to cast
public static String toString(double d)
public static String toString(long l)
l
- long value to cast
public static String toString(int i)
i
- int value to cast
public static String toString(boolean b)
b
- boolean value to cast
public static UDF toFunction(Object o) throws PageException
PageException
public static UDF toFunction(Object o, UDF defaultValue)
public static List toList(Object o) throws PageException
o
- Object to cast
PageException
public static List toList(Object o, List defaultValue)
o
- Object to castdefaultValue
-
public static List toList(Object o, boolean duplicate, List defaultValue)
o
- Object to castduplicate
- defaultValue
-
public static List toList(Object o, boolean duplicate) throws PageException
o
- Object to castduplicate
-
PageException
public static Array toArray(Object o) throws PageException
o
- Object to cast
PageException
public static Object[] toNativeArray(Object o) throws PageException
PageException
public static Array toArray(Object o, Array defaultValue)
o
- Object to castdefaultValue
-
public static Map toMap(Object o) throws PageException
o
- Object to cast
PageException
public static Map toMap(Object o, Map defaultValue)
o
- Object to castdefaultValue
-
public static Map toMap(Object o, boolean duplicate, Map defaultValue)
o
- Object to castduplicate
- defaultValue
-
public static Map toMap(Object o, boolean duplicate) throws PageException
o
- Object to castduplicate
-
PageException
public static Struct toStruct(Object o, Struct defaultValue, boolean caseSensitive)
o
- Object to castdefaultValue
-
public static Struct toStruct(Object o) throws PageException
o
- Object to cast
PageException
public static Struct toStruct(Object o, Struct defaultValue)
public static Struct toStruct(Object o, boolean caseSensitive) throws PageException
PageException
public static byte[] toBinary(Object o) throws PageException
o
- Object to cast
PageException
public static byte[] toBinary(Object o, byte[] defaultValue)
o
- Object to castdefaultValue
-
public static Object toCreditCard(Object o) throws PageException
PageException
public static Object toCreditCard(Object o, String defaultValue)
public static String toBase64(Object o, String charset) throws PageException
o
- Object to cast
PageException
public static String toBase64(Object o, String charset, String defaultValue)
o
- Object to castdefaultValue
-
public static String toB64(String str, String charset) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String toB64(byte[] b)
public static String toB64(String str, String charset, String defaultValue)
public static String toB64(byte[] b, String defaultValue)
public static DateTime toDate(boolean b, TimeZone tz)
b
- boolean to casttz
-
public static DateTime toDate(char c, TimeZone tz)
c
- char to casttz
-
public static DateTime toDate(double d, TimeZone tz)
d
- double to casttz
-
public static DateTime toDate(Object o, TimeZone tz) throws PageException
o
- Object to casttz
-
PageException
public static DateTime toDate(String str, TimeZone tz) throws PageException
str
- String to casttz
-
PageException
public static DateTime toDate(Object o, boolean alsoNumbers, TimeZone tz) throws PageException
o
- Object to castalsoNumbers
- define if also numbers will casted to a datetime valuetz
-
PageException
public static DateTime toDate(Object o, boolean alsoNumbers, TimeZone tz, DateTime defaultValue)
o
- Object to castalsoNumbers
- define if also numbers will casted to a datetime valuetz
- defaultValue
-
public static DateTime toDate(String str, boolean alsoNumbers, TimeZone tz, DateTime defaultValue)
str
- String to castalsoNumbers
- define if also numbers will casted to a datetime valuetz
- defaultValue
-
public static DateTime toDateTime(Object o, TimeZone tz) throws PageException
o
- Object to casttz
-
PageException
public static DateTime toDatetime(Object o, TimeZone tz) throws PageException
o
- Object to casttz
-
PageException
public static Query toQuery(Object o) throws PageException
o
- Object to cast
PageException
public static QueryColumn toQueryColumn(Object o) throws PageException
o
-
PageException
public static QueryColumn toQueryColumn(Object o, PageContext pc) throws PageException
o
-
PageException
public static Query toQuery(Object o, Query defaultValue)
o
- Object to castdefaultValue
-
public static Query toQuery(Object o, boolean duplicate, Query defaultValue)
o
- Object to castduplicate
- duplicate the object or notdefaultValue
-
public static Query toQuery(Object o, boolean duplicate) throws PageException
o
- Object to castduplicate
- duplicate the object or not
PageException
public static Object toUUId(Object o) throws PageException
o
- Object to cast
PageException
public static Object toUUId(Object o, Object defaultValue)
o
- Object to castdefaultValue
-
public static Object toGUId(Object o) throws PageException
o
- Object to cast
PageException
public static Object toGUId(Object o, Object defaultValue)
o
- Object to castdefaultValue
-
public static String toVariableName(Object o) throws PageException
o
- Object to cast
PageException
public static Object toVariableName(Object o, Object defaultValue)
o
- Object to castdefaultValue
-
public static TimeSpan toTimeSpan(Object o) throws PageException
o
- Object to cast
PageException
public static TimeSpan toTimespan(Object o, TimeSpan defaultValue)
o
- Object to castdefaultValue
-
public static TimeSpan toTimespan(Object o) throws PageException
o
- Object to cast
PageException
public static PageException toPageException(Throwable t)
t
- Throwable to cast
public static String toTypeName(Object o)
o
- Object to get type from
public static String toTypeName(Class clazz)
public static String toClassName(Object o)
public static String toClassName(Class clazz)
public static Class cfTypeToClass(String type) throws PageException
PageException
public static Object castTo(PageContext pc, String type, Object o, boolean alsoPattern) throws PageException
pc
- type
- type of the returning Valueo
- Object to cast
PageException
public static String toZip(Object o) throws PageException
PageException
public static String toZip(Object o, String defaultValue)
public static String toURL(Object o) throws PageException
PageException
public static String toURL(Object o, String defaultValue)
public static String toPhone(Object o) throws PageException
PageException
public static String toPhone(Object o, String defaultValue)
public static String toSSN(Object o) throws PageException
PageException
public static String toSSN(Object o, String defaultValue)
public static String toEmail(Object o) throws PageException
PageException
public static String toEmail(Object o, String defaultValue)
public static Object castTo(PageContext pc, short type, String strType, Object o) throws PageException
pc
- type
- type of the returning ValuestrType
- type as Stringo
- Object to cast
PageException
public static Object castTo(PageContext pc, short type, Object o) throws PageException
pc
- type
- type of the returning Valueo
- Object to cast
PageException
public static Object toVoid(Object o) throws ExpressionException
o
-
ExpressionException
public static Object toVoid(Object o, Object defaultValue)
o
- defaultValue
-
public static Object toRef(Object o)
o
- Object to cast
public static String toRef(String o)
o
- Object to cast
public static Collection toRef(Collection o)
o
- Collection to cast
public static String toRef(char c)
c
- char to cast
public static Boolean toRef(boolean b)
b
- boolean to cast
public static Byte toRef(byte b)
b
- byte to cast
public static Integer toRef(int i)
i
- int to cast
public static Float toRef(float f)
f
- float to cast
public static Long toRef(long l)
l
- long to cast
public static Double toRef(double d)
d
- doble to cast
public static Short toRef(short s)
s
- short to cast
public static Iterator toIterator(Object o) throws PageException
o
- Object to cast
PageException
public static Collection toCollection(Object o) throws PageException
o
- Object to cast
PageException
public static Collection toJavaCollection(Object o) throws PageException
PageException
public static Component toComponent(Object o) throws PageException
o
- Object to cast
PageException
public static Component toComponent(Object o, Component defaultValue)
public static Collection toCollection(Object o, Collection defaultValue)
o
- Object to castdefaultValue
-
public static File toFile(Object obj) throws PageException
obj
-
PageException
public static File toFile(Object obj, File defaultValue)
obj
- defaultValue
-
public static Struct toFunctionValues(Object[] args) throws ExpressionException
args
- Object array to convert
ExpressionException
public static Struct toFunctionValues(Object[] args, int offset, int len) throws ExpressionException
ExpressionException
public static Object[] toFunctionValues(Struct args)
public static Locale toLocale(String strLocale) throws ExpressionException
strLocale
-
ExpressionException
public static Locale toLocale(String strLocale, Locale defaultValue)
strLocale
- defaultValue
-
public static TimeZone toTimeZone(String strTimeZone) throws ExpressionException
strTimeZone
-
ExpressionException
public static TimeZone toTimeZone(String strTimeZone, TimeZone defaultValue)
strTimeZone
- defaultValue
-
public static TimeZone toTimeZone(Object oTimeZone, TimeZone defaultValue)
public static NodeList toNodeList(Object o) throws PageException
o
- Object to Cast
PageException
public static NodeList toNodeList(Object o, NodeList defaultValue)
o
- Object to CastdefaultValue
-
public static Node toNode(Object o) throws PageException
o
- Object to Cast
PageException
public static Node toNode(Object o, Node defaultValue)
o
- Object to CastdefaultValue
-
public static Integer toInteger(boolean b)
b
-
public static Integer toInteger(char c)
c
-
public static Integer toInteger(double d)
d
-
public static Integer toInteger(Object o) throws PageException
o
- Object to cast to Integer
PageException
public static Integer toInteger(String str) throws PageException
str
- Object to cast to Integer
PageException
public static Integer toInteger(int i)
public static Integer toInteger(Object o, Integer defaultValue)
o
- Object to cast to IntegerdefaultValue
-
public static Object toNull(Object value) throws PageException
value
-
PageException
public static Object toNull(Object value, Object defaultValue)
value
- defaultValue
-
public static Node toXML(Object value, Node defaultValue)
value
- defaultValue
-
public static Node toXML(Object value) throws PageException
value
-
PageException
public static String toStringForce(Object value, String defaultValue)
public static Resource toResource(PageContext pc, Object src, boolean existing) throws ExpressionException
ExpressionException
public static Resource toResource(PageContext pc, Object src, boolean existing, boolean allowRealpath) throws ExpressionException
ExpressionException
public static Resource toResource(Config config, Object src, boolean existing) throws ExpressionException
ExpressionException
public static Hashtable toHashtable(Object obj) throws PageException
PageException
public static Vector toVetor(Object obj) throws PageException
PageException
public static Calendar toCalendar(Date date, TimeZone tz)
public static Calendar toCalendar(long time, TimeZone tz)
public static Serializable toSerializable(Object object) throws CasterException
CasterException
public static Serializable toSerializable(Object object, Serializable defaultValue)
public static byte[] toBytes(Object obj) throws PageException
PageException
public static InputStream toInputStream(Object obj) throws PageException
PageException
public static OutputStream toOutputStream(Object obj) throws PageException
PageException
public static Object castTo(PageContext pc, Class trgClass, Object obj) throws PageException
PageException
public static Objects toObjects(PageContext pc, Object obj) throws PageException
PageException
public static BigDecimal toBigDecimal(Object o) throws PageException
PageException
public static Object unwrap(Object value) throws PageException
PageException
public static Object unwrap(Object value, Object defaultValue)
public static CharSequence toCharSequence(Object obj) throws PageException
PageException
public static CharSequence toCharSequence(Object obj, CharSequence defaultValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |