NumberUtils { public static boolean isDouble(Class<?> clazz) { return Double.class.equals(clazz) || double.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 testIsDouble() { assertTrue(NumberUtils.isDouble(double.class)); assertTrue(NumberUtils.isDouble(Double.class)); }
@Test public void testIsDouble2() { assertTrue(NumberUtils.isDouble(4.2)); assertTrue(NumberUtils.isDouble(Double.valueOf(12.13))); assertFalse(NumberUtils.isDouble(5L)); assertFalse(NumberUtils.isDouble(null)); }