public class DuckType extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DuckType.Types |
Constructor and Description |
---|
DuckType() |
Modifier and Type | Method and Description |
---|---|
static boolean |
asBoolean(Object value,
boolean coerceType) |
static boolean |
asEmpty(Object value) |
static boolean |
asNull(Object value) |
static Number |
asNumber(Object value) |
static Number |
asNumber(Object value,
boolean coerceType) |
static String |
asString(Object value) |
static String |
asString(Object value,
boolean coerceType) |
protected static Method |
findMethod(Class c,
DuckType.Types type) |
protected static Object |
get(Object value,
DuckType.Types type) |
protected static final Object NO_METHOD
public static boolean asNull(Object value)
public static boolean asBoolean(Object value, boolean coerceType)
public static boolean asEmpty(Object value)
protected static Object get(Object value, DuckType.Types type)
protected static Method findMethod(Class c, DuckType.Types type)
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.