RegularUtil { public static boolean isInt(String s) { return INT.matcher(s).matches(); }  static boolean isIpAddress(String ip); static boolean isInt(String s); static final Pattern IP; static final Pattern INT; }
@Test public void testIsInt() throws Exception { assertEquals(true, (RegularUtil.isInt("45645"))); assertEquals(false, (RegularUtil.isInt("23.1"))); }