Matches a int.

<p>If matched, the int value is extracted.
554202
public static DecomposableMatchBuilder1<Integer, Integer> caseInt(MatchesAny i) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(
        matchers, 0, new PrimitiveFieldExtractor<>(Integer.class));
  }
146934
@Override
	public boolean satisfies(Match match, int... ind)
	{
		assert ind.length == 2;

		return (match.get(ind[0]) == match.get(ind[1])) == equals;
	}
973444
public int getInt(String key) {
    String value = getString(key);
    if (StringUtils.isNotEmpty(value)) {
      return Integer.parseInt(value);
    }
    return 0;
  }
738046
@Override
	public boolean satisfies(Match match, int... ind)
	{
		assert ind.length == 1;

		return clazz.isAssignableFrom(match.get(ind[0]).getModelInterface());
	}
121588
@Override
	public Void visitInt(int i, String p) {
		//System.out.printf(">> %s intValue: %d\n", p, i);

		if (inTasks && AnnotationAttributeType.VERSION.getValue().equals(p)) {
			// add value
			currentValue = (currentValue == null) ? new Pair<Integer, String>() : currentValue;			
			currentValue.value0=i;
			
			if (currentValue.value0!=null && StringUtils.hasText(currentValue.value1)) {
				tasks.add(currentValue);
				currentValue=null;
			}
		}

		return null;
	}
294903
public static final Integer getInteger(String value)
   {
      Integer result;

      try
      {
         result = Integer.valueOf(Integer.parseInt(value));
      }

      catch (Exception ex)
      {
         result = null;
      }

      return (result);
   }
1238544
protected int extractDigit(final char value) throws NumberFormatException {
    if (Character.isDigit(value)) {
      return Character.digit(value, DEC_RADIX);
    } else {
      throw LOG.getCharacterIsNotADigitException(value);
    }
  }
98515
public static boolean isInteger(String string) {
    if (string == null) {
      return false;
    }

    try {
      Integer.parseInt(string);
    } catch (NumberFormatException e) {
      return false;
    }

    return true;
  }
896080
private boolean exactMatch(String str, int i) {
    int end = str.length() - i;
    for (String p : _patterns) {
      int start = end - p.length();
      if (start >= 0 && str.regionMatches(start, p, 0, p.length())) {
        return true;
      }
    }
    return false;
  }
1232715
public boolean isMatched(String value)
    {
        if (value == null)
            return false;
        if ((_match != null)) {
            for (int i = 0; i < _match.length; i++) {
                if (value.equals(_match[i]))
                    return true;
            }
        }
        else {
            if (_defaultSelections != null) {
                return (_defaultSelections.contains(value));
            }
        }

        return false;

    }
196761
public boolean isMatch(int count) {
        if (a == 0) {
            return count == b;
        } else if (a > 0) {
            if (count < b) {
                return false;
            }

            return (count - b) % a == 0;
        } else {
            if (count > b) {
                return false;
            }

            return (b - count) % (-a) == 0;
        }
    }
930
public boolean matchesDigit() {
        return !isEmpty() && (Character.isDigit(queue.charAt(pos))
                || queue.charAt(pos) == '-' && remainingLength() >= 2 && Character.isDigit(queue.charAt(pos + 1)));
    }
410214
@Override
    public int matches(Replaceable text,
                       int[] offset,
                       int limit,
                       boolean incremental) {
        int c;
        if (offset[0] < limit &&
            contains(c = text.char32At(offset[0]))) {
            offset[0] += UTF16.getCharCount(c);
            return U_MATCH;
        }
        if (offset[0] > limit && contains(text.char32At(offset[0]))) {
            // Backup offset by 1, unless the preceding character is a
            // surrogate pair -- then backup by 2 (keep offset pointing at
            // the lead surrogate).
            --offset[0];
            if (offset[0] >= 0) {
                offset[0] -= UTF16.getCharCount(text.char32At(offset[0])) - 1;
            }
            return U_MATCH;
        }
        if (incremental && offset[0] == limit) {
            return U_PARTIAL_MATCH;
        }
        return U_MISMATCH;
    }
1193092
@Override
	public boolean satisfies(Match match, int... ind)
	{
		assertIndLength(ind);

		return con.generate(match, ind).isEmpty();
	}
1294836
public boolean isMatch(InputReader reader) throws IOException
    {
        int rc = match(reader);
        return (rc == 1 && reader.read() == -1);
    }
183750
public int getInt(String key){
        try {
            return Integer.parseInt(resource.getString(key));
        } catch (NumberFormatException e) {
            return -1; // modify here if you need to throw a Exception here
        }
    }
671242
public static int getInt(CSProperties p, String key) throws ParseException {
        String val = p.get(key).toString();
        if (val == null) {
            throw new IllegalArgumentException(key);
        }
        return Integer.parseInt(val);
    }