StreamClassUtil { public static boolean isFloatingPointNumber(Number value) { if ((value instanceof Float) || (value instanceof Double)) { return true; } return false; }  static Class< ? > getWrapType(Class< ? > type); static boolean isNumberic(Class< ? > type); static Class< ? > getArithmaticType(Class< ? > leftType, Class< ? > rightType); static Class< ? > getCommonType(List<Class< ? >> childTypes); static Number getNumbericValueForType(Number result, Class< ? > resultType); static BigDecimal getBigDecimalValue(Number result); static boolean isFloatingPointNumber(Number value); static Class< ? > getCompareType(Class< ? > typeOne, Class< ? > typeTwo); static boolean isBoolean(Class< ? > type); static boolean isDateOrTimestamp(Class< ? > type);  }
@Test public void testIsFloatingPointNumber() { Assert.assertEquals(true, StreamClassUtil.isFloatingPointNumber(new Float(1.0f))); Assert.assertEquals(true, StreamClassUtil.isFloatingPointNumber(new Double(1.0d))); Assert.assertEquals(false, StreamClassUtil.isFloatingPointNumber(new Integer(1))); Assert.assertEquals(false, StreamClassUtil.isFloatingPointNumber(new Long(1))); Assert.assertEquals(false, StreamClassUtil.isFloatingPointNumber(new BigDecimal(1.0f))); }