public class ValueType extends Object implements HasTypes
Constructor and Description |
---|
ValueType(Class<?> type) |
ValueType(Iterable<? extends Class<?>> types) |
Modifier and Type | Method and Description |
---|---|
static boolean |
isPrimitiveValue(Object object)
Check if a non-null object is of any of the Primitive Value Types or an array of them.
|
static boolean |
isPrimitiveValueType(Class<?> type) |
static boolean |
isPrimitiveValueType(ValueType valueType) |
Class<?> |
mainType() |
static ValueType |
of(Class<?> type) |
String |
toString() |
Iterable<Class<?>> |
types() |
public ValueType(Class<?> type)
public static boolean isPrimitiveValue(Object object)
String, Boolean, Integer, Double, Float, Long, Byte, Short and Character and their Java primitive types counterparts are considered as Primitive Value Types.
Date, BigInteger, BigDecimal and JodaTime types are not considered as Primitive Value Types.
IllegalArgumentException
- if object is nullpublic static boolean isPrimitiveValueType(ValueType valueType)
public static boolean isPrimitiveValueType(Class<?> type)
isPrimitiveValue(java.lang.Object)
public Class<?> mainType()