NumberUtils { public static boolean isInteger(Class<?> clazz) { return Integer.class.equals(clazz) || int.class.equals(clazz); } private  NumberUtils(); static String format(Object value); static boolean isDouble(Class<?> clazz); static boolean isDouble(Object value); static boolean isFloat(Class<?> clazz); static boolean isInteger(Class<?> clazz); static boolean isInteger(Object value); static boolean isLong(Class<?> clazz); static boolean isLong(Object value); static boolean isNumeric(Class<?> clazz);  }
@Test public void testIsInteger() { assertTrue(NumberUtils.isInteger(Integer.class)); assertTrue(NumberUtils.isInteger(int.class)); assertFalse(NumberUtils.isInteger(Long.class)); }
@Test public void testIsInteger2() { assertTrue(NumberUtils.isInteger(4)); assertTrue(NumberUtils.isInteger(Integer.valueOf(12))); assertFalse(NumberUtils.isInteger(5L)); assertFalse(NumberUtils.isInteger(null)); }