List of utility methods to do Regex Int Validate
Integer | parseInt(Object str) parse Int return str == null ? 0
: Integer.valueOf((isNumeric(str.toString())) ? Integer.parseInt(str.toString()) : 0);
|
Integer | parseInt(String value) parse Int if (value == null) { return 0; Integer val = 0; try { Matcher matcher = pattern.matcher(value); if (matcher.find()) { String num = matcher.group(0); ... |
int[] | parseInt(String[] strs) parse Int int[] strs_int = new int[strs.length]; for (int i = 0; i < strs_int.length; i++) { if (can2Int(strs[i])) { strs_int[i] = Integer.parseInt(strs[i]); return strs_int; |
int | parseInteger(String attrVal) Returns the integer represented by attrVal or Integer.MIN_VALUE on error.
if (attrVal == null) { return Integer.MIN_VALUE; Matcher m = INTEGER_PATTERN.matcher(attrVal); if (!m.matches()) { return Integer.MIN_VALUE; try { ... |
Integer | parseInteger(String inStr, Integer def) parse Integer if (isEmpty(inStr) || !isNumeric(inStr)) { return def; } else { return Integer.valueOf(inStr); |
Integer | parseInteger(String key, String sourceString) parse Integer Integer result = null; if (sourceString != null) { Pattern pattern = Pattern.compile(quoteForRegEx(key) + "=(\\d++)"); Matcher matcher = pattern.matcher(sourceString); if (matcher.find()) { result = new Integer(matcher.group(1)); return result; |
int | parseInteger(String str) parse Integer return !isInteger(str) ? 0 : Integer.parseInt(str);
|
int[] | parseIntegerList(String var0, int var1, int var2) parse Integer List ArrayList var3 = new ArrayList(); Pattern var4 = Pattern.compile("(\\d*)-(\\d*)"); String[] var5 = var0.replace(',', ' ').split("\\s+"); int var6 = var5.length; for (int var7 = 0; var7 < var6; ++var7) { String var8 = var5[var7]; try { if (var8.matches("\\d+")) { ... |
int[] | parseIntegers(String integerString) Given a string of the form "a,b,c-d,e,...", parse out the integers represented including those within the (hyphenated) ranges. final List<Integer> integers = new ArrayList<Integer>(); final String[] pieces = integerString.split(","); for (String piece : pieces) { collectIntegers(piece, integers); final int[] result = new int[integers.size()]; int index = 0; for (Integer integer : integers) { ... |
String | parseIntToString(String value) parse Int To String Matcher matcher = pattern.matcher(value); if (matcher.find()) { return matcher.group(0); return null; |