IsIntegerFunction implements DDMExpressionFunction.Function1<Object, Boolean> { @Override public Boolean apply(Object parameter) { Integer value = NumberUtils.toInt( parameter.toString(), Integer.MIN_VALUE); return value != Integer.MIN_VALUE; }  @Override Boolean apply(Object parameter); @Override String getName(); static final String NAME; }
@Test public void testInteger() { IsIntegerFunction isIntegerFunction = new IsIntegerFunction(); Boolean result = isIntegerFunction.apply("12312545"); Assert.assertTrue(result); }
@Test public void testNotAInteger() { IsIntegerFunction isIntegerFunction = new IsIntegerFunction(); Boolean result = isIntegerFunction.apply("number"); Assert.assertFalse(result); }
@Test public void testOutbound() { IsIntegerFunction isIntegerFunction = new IsIntegerFunction(); Boolean result = isIntegerFunction.apply( "2312321243423432423424234233234324324242"); Assert.assertFalse(result); }