public class PrimitiveStringTypeCoercions
extends java.lang.Object
| Constructor and Description |
|---|
PrimitiveStringTypeCoercions() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
castPrimitive(java.lang.Object value,
java.lang.Class<T> targetType)
Sometimes need to explicitly cast primitives, rather than relying on Java casting.
|
static boolean |
isPrimitiveOrBoxer(java.lang.Class<?> type) |
static <T> T |
stringToPrimitive(java.lang.String value,
java.lang.Class<T> targetType) |
static <T> Maybe<T> |
tryCoerce(java.lang.Object value,
java.lang.Class<? super T> targetType) |
public static <T> Maybe<T> tryCoerce(java.lang.Object value, java.lang.Class<? super T> targetType)
public static <T> T castPrimitive(java.lang.Object value,
java.lang.Class<T> targetType)
public static boolean isPrimitiveOrBoxer(java.lang.Class<?> type)
public static <T> T stringToPrimitive(java.lang.String value,
java.lang.Class<T> targetType)