public static int parseBoundedInt(String intStr, int minValue, int maxValue)
			throws NumberFormatException {
		if (intStr == null || intStr.isEmpty()) {
			throw new NumberFormatException("Missing value");
		}
		long tmp = parseLong(intStr);
		if (tmp < minValue || tmp > maxValue) {
			throw new NumberFormatException(
				"Integer value " + tmp + " out of range: [" + minValue + ".." + maxValue + "]");
		}
		return (int) tmp;
	}
Parses the specified string as a decimal number, returning its integer
value.

@param intStr String with integer digits
@param minValue minimum value allowed (inclusive)
@param maxValue maximum value allowed (inclusive)
@return integer value of the intStr
@throws NumberFormatException if intStr is null or empty or could not be
            parsed or is out of range.
Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/XmlUtilities.java