@Test public void testIsIntegerTrue() { Assert.assertTrue(StringUtil.isInteger("-1")); Assert.assertTrue(StringUtil.isInteger("1")); Assert.assertTrue(StringUtil.isInteger("+1")); Assert.assertTrue(StringUtil.isInteger("+")); Assert.assertTrue(StringUtil.isInteger("-")); }
public static boolean isInteger(String str) { if (null == str || "".equals(str)) { return false; } Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); return pattern.matcher(str).matches(); }
StringUtil { public static boolean isInteger(String str) { if (null == str || "".equals(str)) { return false; } Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); return pattern.matcher(str).matches(); } }
StringUtil { public static boolean isInteger(String str) { if (null == str || "".equals(str)) { return false; } Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); return pattern.matcher(str).matches(); } private  StringUtil(); }
StringUtil { public static boolean isInteger(String str) { if (null == str || "".equals(str)) { return false; } Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); return pattern.matcher(str).matches(); } private  StringUtil(); static boolean isNullOrEmpty(String str); static boolean isInteger(String str); static boolean isDouble(String str); static String upFirstChar(String Str); static String lowerFirstChar(String s); }
StringUtil { public static boolean isInteger(String str) { if (null == str || "".equals(str)) { return false; } Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); return pattern.matcher(str).matches(); } private  StringUtil(); static boolean isNullOrEmpty(String str); static boolean isInteger(String str); static boolean isDouble(String str); static String upFirstChar(String Str); static String lowerFirstChar(String s);  }