code: public boolean matches(String text) {
          if (text == null) {
              return false;
          }
          if (this.regex) {
              final Pattern rx;
              if (this.caseSensitive) {
                  rx = Pattern.compile(this.value);
              } else {
                  rx = Pattern.compile(this.value, Pattern.CASE_INSENSITIVE);
              }
              return rx.matcher(text).matches();
          } else {
              if (this.caseSensitive) {
                  return value.equals(text);
              } else {
                  return value.equalsIgnoreCase(text);
              }
          }
      }
docs: Uses the object's properties to determine if the supplied string matches
  the value of this property.
  
  @param text the String to validate
  @return whether the text supplied is matched by the value of the property