public class DefaultTypeTransformation extends Object
Modifier and Type | Field and Description |
---|---|
protected static Object[] |
EMPTY_ARGUMENTS |
protected static BigInteger |
ONE_NEG |
Constructor and Description |
---|
DefaultTypeTransformation() |
Modifier and Type | Method and Description |
---|---|
static Collection |
arrayAsCollection(Object value) |
static <T> Collection<T> |
arrayAsCollection(T[] value) |
static Object |
asArray(Object object,
Class type) |
static Collection |
asCollection(Object value) |
static <T> Collection<T> |
asCollection(T[] value) |
static boolean |
booleanUnbox(Object value) |
static Object |
box(boolean value)
Deprecated.
|
static Object |
box(byte value)
Deprecated.
|
static Object |
box(char value)
Deprecated.
|
static Object |
box(double value)
Deprecated.
|
static Object |
box(float value)
Deprecated.
|
static Object |
box(int value)
Deprecated.
|
static Object |
box(long value)
Deprecated.
|
static Object |
box(short value)
Deprecated.
|
static byte |
byteUnbox(Object value) |
static boolean |
castToBoolean(Object object)
Method used for coercing an object to a boolean value,
thanks to an
asBoolean() method added on types. |
static char |
castToChar(Object object)
Deprecated.
|
static Number |
castToNumber(Object object) |
static Number |
castToNumber(Object object,
Class type) |
static Object |
castToType(Object object,
Class type) |
static Object |
castToVargsArray(Object[] origin,
int firstVargsPos,
Class<?> arrayType) |
static char |
charUnbox(Object value) |
static boolean |
compareArrayEqual(Object left,
Object right) |
static boolean |
compareEqual(Object left,
Object right) |
static int |
compareTo(Object left,
Object right)
Compares the two objects handling nulls gracefully and performing numeric type coercion if required
|
static boolean[] |
convertToBooleanArray(Object a)
Deprecated.
|
static byte[] |
convertToByteArray(Object a)
Deprecated.
|
static char[] |
convertToCharArray(Object a)
Deprecated.
|
static double[] |
convertToDoubleArray(Object a)
Deprecated.
|
static float[] |
convertToFloatArray(Object a)
Deprecated.
|
static int[] |
convertToIntArray(Object a)
Deprecated.
|
static long[] |
convertToLongArray(Object a)
Deprecated.
|
static Object |
convertToPrimitiveArray(Object a,
Class type)
Deprecated.
|
static short[] |
convertToShortArray(Object a)
Deprecated.
|
static double |
doubleUnbox(Object value) |
static float |
floatUnbox(Object value) |
static Character |
getCharFromSizeOneString(Object value)
Deprecated.
|
static int |
intUnbox(Object value) |
static boolean |
isEnumSubclass(Object value)
Deprecated.
|
static long |
longUnbox(Object value) |
static Object[] |
primitiveArrayBox(Object array) |
static List |
primitiveArrayToList(Object array)
Allows conversion of arrays into a mutable List
|
static short |
shortUnbox(Object value) |
protected static final Object[] EMPTY_ARGUMENTS
protected static final BigInteger ONE_NEG
public static byte byteUnbox(Object value)
public static char charUnbox(Object value)
public static short shortUnbox(Object value)
public static int intUnbox(Object value)
public static boolean booleanUnbox(Object value)
public static long longUnbox(Object value)
public static float floatUnbox(Object value)
public static double doubleUnbox(Object value)
@Deprecated public static Object box(boolean value)
@Deprecated public static Object box(byte value)
@Deprecated public static Object box(char value)
@Deprecated public static Object box(short value)
@Deprecated public static Object box(int value)
@Deprecated public static Object box(long value)
@Deprecated public static Object box(float value)
@Deprecated public static Object box(double value)
public static boolean castToBoolean(Object object)
asBoolean()
method added on types.object
- to coerce to a boolean value@Deprecated public static char castToChar(Object object)
public static <T> Collection<T> asCollection(T[] value)
public static Collection asCollection(Object value)
public static Collection arrayAsCollection(Object value)
public static <T> Collection<T> arrayAsCollection(T[] value)
@Deprecated public static boolean isEnumSubclass(Object value)
value
- an objectpublic static List primitiveArrayToList(Object array)
array
- an arraypublic static int compareTo(Object left, Object right)
@Deprecated public static int[] convertToIntArray(Object a)
@Deprecated public static boolean[] convertToBooleanArray(Object a)
@Deprecated public static byte[] convertToByteArray(Object a)
@Deprecated public static short[] convertToShortArray(Object a)
@Deprecated public static char[] convertToCharArray(Object a)
@Deprecated public static long[] convertToLongArray(Object a)
@Deprecated public static float[] convertToFloatArray(Object a)
@Deprecated public static double[] convertToDoubleArray(Object a)
@Deprecated public static Object convertToPrimitiveArray(Object a, Class type)
@Deprecated public static Character getCharFromSizeOneString(Object value)