org.apache.commons.jexl.util
public class Coercion extends Object
Since: 1.0
Method Summary | |
---|---|
static Boolean | coerceBoolean(Object val)
Coerce to a Boolean.
|
static Double | coerceDouble(Object val)
Coerce to a Double.
|
static Integer | coerceInteger(Object val)
Coerce to a Integer.
|
static Long | coerceLong(Object val)
Coerce to a Long.
|
static boolean | isFloatingPoint(Object o)
Is Object a floating point number.
|
static boolean | isNumberable(Object o)
Is Object a whole number.
|
Parameters: val Object to be coerced.
Returns: The Boolean coerced value, or null if none possible.
Parameters: val Object to be coerced.
Returns: The Double coerced value.
Throws: Exception If Double coercion fails.
Parameters: val Object to be coerced.
Returns: The Integer coerced value.
Throws: Exception If Integer coercion fails.
Parameters: val Object to be coerced.
Returns: The Long coerced value.
Throws: Exception If Long coercion fails.
Parameters: o Object to be analyzed.
Returns: true if it is a Float or a Double.
Parameters: o Object to be analyzed.
Returns: true if Integer, Long, Byte, Short or Character.