public class Coercion extends Object
| Constructor and Description |
|---|
Coercion() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static Boolean coerceBoolean(Object val)
val - Object to be coerced.public static Integer coerceInteger(Object val) throws Exception
val - Object to be coerced.Exception - If Integer coercion fails.public static Long coerceLong(Object val) throws Exception
val - Object to be coerced.Exception - If Long coercion fails.public static Double coerceDouble(Object val) throws Exception
val - Object to be coerced.Exception - If Double coercion fails.public static boolean isFloatingPoint(Object o)
o - Object to be analyzed.public static boolean isNumberable(Object o)
o - Object to be analyzed.Copyright © 2015 The Apache Software Foundation. All rights reserved.