Esempio n. 1
0
  /**
   * Does the pattern match the given value
   *
   * @param value value to check
   * @return Pattern matches value
   */
  public boolean match(Data value) throws Exception {
    if (value instanceof Real && isNumericRange()) {
      Real[] range = getNumericRange();
      Real r = (Real) value;
      if (r.__ge__(range[0]) == 0) return false;
      if (r.__le__(range[1]) == 0) return false;
      return true;
    }

    String stringValue = value.toString();
    return StringUtil.stringMatch(stringValue, pattern, true, true);
  }