| Modifier and Type | Field and Description |
|---|---|
| private static final Map | PRIMITIVE_TO_WRAPPER_TYPE
A map from primitive types to their corresponding wrapper types. |
| private static final Map | WRAPPER_TO_PRIMITIVE_TYPE
A map from wrapper types to their corresponding primitive types. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public static Set | |
| public static Set | |
| public static boolean | isWrapperType(Class<?> type)
Returns |
| public static <T> Class | |
| public static <T> Class |
| PRIMITIVE_TO_WRAPPER_TYPE | back to summary |
|---|---|
| private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPE A map from primitive types to their corresponding wrapper types. | |
| WRAPPER_TO_PRIMITIVE_TYPE | back to summary |
|---|---|
| private static final Map<Class<?>, Class<?>> WRAPPER_TO_PRIMITIVE_TYPE A map from wrapper types to their corresponding primitive types. | |
| Primitives | back to summary |
|---|---|
| private Primitives() | |
| add | back to summary |
|---|---|
| private static void add(Map<Class<?>, Class<?>> forward, Map<Class<?>, Class<?>> backward, Class<?> key, Class<?> value) | |
| allPrimitiveTypes | back to summary |
|---|---|
| public static Set Returns an immutable set of all nine primitive types (including
| |
| allWrapperTypes | back to summary |
|---|---|
| public static Set Returns an immutable set of all nine primitive-wrapper types (including
| |
| isWrapperType | back to summary |
|---|---|
| public static boolean isWrapperType(Class<?> type) Returns
| |
| unwrap | back to summary |
|---|---|
| public static <T> Class Returns the corresponding primitive type of
unwrap(Integer.class) == int.class
unwrap(int.class) == int.class
unwrap(String.class) == String.class
| |
| wrap | back to summary |
|---|---|
| public static <T> Class Returns the corresponding wrapper type of
wrap(int.class) == Integer.class
wrap(Integer.class) == Integer.class
wrap(String.class) == String.class
| |