Package com.macrofocus.utils
Class TypeUtils
java.lang.Object
com.macrofocus.utils.TypeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isNumericType
(Class<?> type) Checks if the type is a numeric type.static boolean
isTemporalType
(Class<?> type) Checks if the type is a temporal type such as Date, Calendar, long or double that can be used to represent date or time.static boolean
isVisualType
(Class<?> type) Checks if the type is a type that can be visualized such as color, image or icon.
-
Constructor Details
-
TypeUtils
public TypeUtils()
-
-
Method Details
-
isNumericType
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.
-
isTemporalType
Checks if the type is a temporal type such as Date, Calendar, long or double that can be used to represent date or time.- Parameters:
type
- the data type.- Returns:
- true if it is temporal type including all subclasses.
-
isVisualType
Checks if the type is a type that can be visualized such as color, image or icon.- Parameters:
type
- the data type.- Returns:
- true if it is visual type including all subclasses.
-