@Test public void testIsNumeric() { assertTrue(ValidatorUtil.isNumeric("100")); assertTrue(ValidatorUtil.isNumeric("0.001234")); assertTrue(ValidatorUtil.isNumeric("123.25")); assertTrue(ValidatorUtil.isNumeric("100,000")); assertFalse(ValidatorUtil.isNumeric("100.0.1")); }
public static boolean isNumeric(String number) { if (StringUtil.isEmpty(number)) return false; String expression = "-?\\d+(.\\d+)?"; return isMatchRegex(number, expression); }
ValidatorUtil { public static boolean isNumeric(String number) { if (StringUtil.isEmpty(number)) return false; String expression = "-?\\d+(.\\d+)?"; return isMatchRegex(number, expression); } }
ValidatorUtil { public static boolean isNumeric(String number) { if (StringUtil.isEmpty(number)) return false; String expression = "-?\\d+(.\\d+)?"; return isMatchRegex(number, expression); } private  ValidatorUtil(); }
ValidatorUtil { public static boolean isNumeric(String number) { if (StringUtil.isEmpty(number)) return false; String expression = "-?\\d+(.\\d+)?"; return isMatchRegex(number, expression); } private  ValidatorUtil(); static boolean isEmail(String email); static boolean isPhoneNumber(String phoneNumber); static boolean isMatchRegex(String input, String regex); static boolean isNumeric(String number); static boolean isValidDateRange(Date dateField1, Date dateField2, String dateFormat); }
ValidatorUtil { public static boolean isNumeric(String number) { if (StringUtil.isEmpty(number)) return false; String expression = "-?\\d+(.\\d+)?"; return isMatchRegex(number, expression); } private  ValidatorUtil(); static boolean isEmail(String email); static boolean isPhoneNumber(String phoneNumber); static boolean isMatchRegex(String input, String regex); static boolean isNumeric(String number); static boolean isValidDateRange(Date dateField1, Date dateField2, String dateFormat);  }