Check if the given class is a number type. @param type The class to check @return true if the class is a number type
(final Class<?> type)
| 448 | * @return true if the class is a number type |
| 449 | */ |
| 450 | public static boolean isNumberType(final Class<?> type) { |
| 451 | return type == Long.TYPE || type == Double.TYPE || type == Byte.TYPE || type == Short.TYPE || |
| 452 | type == Integer.TYPE || type == Float.TYPE || Number.class.isAssignableFrom(type); |
| 453 | } |
| 454 | |
| 455 | /** |
| 456 | * Protected constructor for subclasses. |
no test coverage detected