public abstract class Skb_ObjectUtils extends Object
| Constructor and Description |
|---|
Skb_ObjectUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
CONVERT(Object value,
Class<T> clazz)
Type safe casting or conversion from Object to target class, special processing for Object[] and Collections.
|
static <T> T |
CONVERT(Object value,
Class<T> clazz,
T nullValue,
T falseValue)
Type safe casting or conversion from Object to target class, special processing for Object[] and Collections.
|
static <T> T |
CONVERT(Object value,
Class<T> clazz,
T nullValue,
T falseValue,
boolean collFirst)
Type safe casting or conversion from Object to target class, with optional special processing for Object[] and Collections.
|
static Skb_Transformer<String,Boolean> |
OBJECT_TO_BOOLEAN()
Returns a transformer that takes a string and returns a boolean value, or null.
|
static <T> Skb_Transformer<Object,T> |
OBJECT_TO_TARGET(Class<T> clazz,
T nullValue,
T falseValue,
boolean collFirst)
Type safe transformation from Object to target class, with optional special processing for Object[] and Collections.
|
public static final Skb_Transformer<String,Boolean> OBJECT_TO_BOOLEAN()
public static final <T> Skb_Transformer<Object,T> OBJECT_TO_TARGET(Class<T> clazz, T nullValue, T falseValue, boolean collFirst)
T - target class for the transformationclazz - the requested type of the return value, required for initialisationnullValue - the value to be used if a null test succeedsfalseValue - the value to be used in case no test succeedscollFirst - if set true, collections will be processed and the first element returned, no special collection processing otherwisepublic static final <T> T CONVERT(Object value, Class<T> clazz)
CONVERT(Object, Class, Object, Object, boolean) with both return values set to null and
the last argument set to true (i.e. special processing of collections).T - type of the return objectvalue - the value that should be convertedclazz - the requested type of the return value, needed for initialisationCONVERT(Object, Class, Object, Object, boolean)public static final <T> T CONVERT(Object value, Class<T> clazz, T nullValue, T falseValue)
CONVERT(Object, Class, Object, Object, boolean) with the last
argument set to true (i.e. special processing of collections).T - type of the return objectvalue - the value that should be convertedclazz - the requested type of the return value, needed for initialisationnullValue - the value to be used if a null test succeedsfalseValue - the value to be used in case no test succeedsCONVERT(Object, Class, Object, Object, boolean)public static final <T> T CONVERT(Object value, Class<T> clazz, T nullValue, T falseValue, boolean collFirst)
T - type of the return objectvalue - the value that should be convertedclazz - the requested type of the return value, needed for initialisationnullValue - the value to be used if a null test succeedsfalseValue - the value to be used in case no test succeedscollFirst - if set true, collections will be processed and the first element returned, no special collection processing otherwiseOBJECT_TO_TARGET(java.lang.Class<T>, T, T, boolean)Copyright © 2010–2015. All rights reserved.