do { if (match("^\\d+$", cond)) { if (Integer.valueOf(cond) < 0) // not allowed return false; if (match("^\\d+-\\d+$", cond)) { int from = Integer.valueOf(cond.substring(0, cond.indexOf('-'))); int to = Integer.valueOf(cond.substring(cond.indexOf('-') + 1, cond.length())); if (match("^<\\d+$", cond)) { int n = Integer.valueOf(cond.substring(cond.indexOf('<') + 1, cond.length())); if (n == 0) // not allowed if (match("^>\\d+$", cond)) { break;
while (st.hasMoreTokens() && !addVal) { String cond = st.nextToken().trim().replaceAll(" ", ""); if (match("^\\d+$", cond)) { // n if (Integer.valueOf(cond) == val) addVal = true; if (match("^\\d+-\\d+$", cond)) { // n-m int from = Integer.valueOf(cond.substring(0, cond.indexOf('-'))); int to = Integer.valueOf(cond.substring(cond.indexOf('-') + 1, cond.length())); if (match("^>\\d+$", cond)) { // <n int n = Integer.valueOf(cond.substring(cond.indexOf('>') + 1, cond.length())); if (val > n) { if (match("^<\\d+$", cond)) { // >n int n = Integer.valueOf(cond.substring(cond.indexOf('<') + 1, cond.length())); if (val < n) {