org.apache.commons.jexl.util
public class Coercion extends java.lang.Object
Constructor and Description |
---|
Coercion() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Boolean |
coerceBoolean(java.lang.Object val)
Coerce to a Boolean.
|
static java.lang.Double |
coerceDouble(java.lang.Object val)
Coerce to a Double.
|
static java.lang.Integer |
coerceInteger(java.lang.Object val)
Coerce to a Integer.
|
static java.lang.Long |
coerceLong(java.lang.Object val)
Coerce to a Long.
|
static boolean |
isFloatingPoint(java.lang.Object o)
Is Object a floating point number.
|
static boolean |
isNumberable(java.lang.Object o)
Is Object a whole number.
|
public static java.lang.Boolean coerceBoolean(java.lang.Object val)
val
- Object to be coerced.public static java.lang.Integer coerceInteger(java.lang.Object val) throws java.lang.Exception
val
- Object to be coerced.java.lang.Exception
- If Integer coercion fails.public static java.lang.Long coerceLong(java.lang.Object val) throws java.lang.Exception
val
- Object to be coerced.java.lang.Exception
- If Long coercion fails.public static java.lang.Double coerceDouble(java.lang.Object val) throws java.lang.Exception
val
- Object to be coerced.java.lang.Exception
- If Double coercion fails.public static boolean isFloatingPoint(java.lang.Object o)
o
- Object to be analyzed.public static boolean isNumberable(java.lang.Object o)
o
- Object to be analyzed.Copyright © 2014 The Apache Software Foundation. All Rights Reserved.