JIDE Common Layer 2.7.6

com.jidesoft.utils
Class TypeUtils

java.lang.Object
  extended by com.jidesoft.utils.TypeUtils

public class TypeUtils
extends java.lang.Object

Utils methods for data type.


Constructor Summary
TypeUtils()
           
 
Method Summary
static java.lang.Class<?> convertPrimitiveToWrapperType(java.lang.Class<?> primitive)
           
static java.lang.Class<?> convertWrapperToPrimitiveType(java.lang.Class<?> wrapperType)
           
static boolean isNumericType(java.lang.Class<?> type)
          Checks if the type is a numeric type.
static boolean isPrimitive(java.lang.Class<?> primitive)
           
static boolean isPrimitiveWrapper(java.lang.Class<?> wrapperType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeUtils

public TypeUtils()
Method Detail

isPrimitive

public static boolean isPrimitive(java.lang.Class<?> primitive)

isPrimitiveWrapper

public static boolean isPrimitiveWrapper(java.lang.Class<?> wrapperType)

convertPrimitiveToWrapperType

public static java.lang.Class<?> convertPrimitiveToWrapperType(java.lang.Class<?> primitive)

convertWrapperToPrimitiveType

public static java.lang.Class<?> convertWrapperToPrimitiveType(java.lang.Class<?> wrapperType)

isNumericType

public static boolean isNumericType(java.lang.Class<?> type)
Checks if the type is a numeric type.

Parameters:
type - the data type.
Returns:
true if it is numeric type including all subclasses of Number, double, int, float, short and long.

JIDE Common Layer 2.7.6