| java.lang.Object org.zkoss.xel.fn.CommonFns
CommonFns | public class CommonFns (Code) | | Functions used with EL.
author: tomyeh |
Method Summary | |
final public static String | getLabel(String key) Returns the label or message of the specified key. | public static boolean | isInstance(Object c, Object o) Tests whehter an object, o, is an instance of a class, c. | final public static int | length(Object o) Returns the length of an array, string, collection or map. | final public static Object | new_(Object o) Instantiates the specified class. | public static boolean | toBoolean(Object val) Converts the specified object to a boolean. | public static char | toChar(Object val) Converts the specified object to an character. | public static BigDecimal | toDecimal(Object val) Converts the specified object to a (big) decimal. | public static int | toInt(Object val) Converts the specified object to an integer. | public static Number | toNumber(Object val) Converts the specified object to a number. | public static String | toString(Object val) Converts the specified object to a string. |
CommonFns | protected CommonFns()(Code) | | |
getLabel | final public static String getLabel(String key)(Code) | | Returns the label or message of the specified key.
- If key is "mesg:class:MMM", Messages.get(class.MMM) is called
- Otherwise,
Labels.getLabel is called.
|
isInstance | public static boolean isInstance(Object c, Object o)(Code) | | Tests whehter an object, o, is an instance of a class, c.
|
length | final public static int length(Object o)(Code) | | Returns the length of an array, string, collection or map.
|
toBoolean | public static boolean toBoolean(Object val)(Code) | | Converts the specified object to a boolean.
|
toChar | public static char toChar(Object val)(Code) | | Converts the specified object to an character.
|
toDecimal | public static BigDecimal toDecimal(Object val)(Code) | | Converts the specified object to a (big) decimal.
|
toInt | public static int toInt(Object val)(Code) | | Converts the specified object to an integer.
|
toNumber | public static Number toNumber(Object val)(Code) | | Converts the specified object to a number.
|
toString | public static String toString(Object val)(Code) | | Converts the specified object to a string.
|
|
|