public class Boxing
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static com.google.common.collect.ImmutableBiMap<java.lang.Class<?>,java.lang.Class<?>> |
PRIMITIVE_TO_BOXED |
Constructor and Description |
---|
Boxing() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
boxedType(java.lang.Class<?> type) |
static void |
setInArray(java.lang.Object target,
int index,
java.lang.Object value,
java.lang.Class<?> type)
sets the given element in an array to the indicated value;
if the type is a primitive type, the appropriate primitive method is used
|
static boolean |
unboxSafely(java.lang.Boolean ref,
boolean valueIfNull) |
public static final com.google.common.collect.ImmutableBiMap<java.lang.Class<?>,java.lang.Class<?>> PRIMITIVE_TO_BOXED
public static boolean unboxSafely(java.lang.Boolean ref, boolean valueIfNull)
public static java.lang.Class<?> boxedType(java.lang.Class<?> type)
public static void setInArray(java.lang.Object target, int index, java.lang.Object value, java.lang.Class<?> type)
this is needed because arrays do not deal with autoboxing