List of utility methods to do Object to Char
Character | castToChar(Object value) cast To Char if (value == null) { return null; if (value instanceof Character) { return (Character) value; if (value instanceof String) { String strVal = (String) value; ... |
Character | castToCharacter(Object value) cast To Character return (Character) value;
|
char | objectToChar(Object p1) The following are used to in visage casts of object to a primitive type, eg: function(pp) { pp as Float} If the Object passed in is not a Number or Character, then a ClassCastException will occur, which is ok because it isn't legal in visage to cast a non numeric to a numeric. if (p1 == null) { return 0; if (p1 instanceof Character) { return ((Character) p1).charValue(); return (char) ((Number) p1).intValue(); |