code: public boolean optionMatches(String namePattern, String valuePattern) {
      Matcher nameMatcher = Pattern.compile(namePattern).matcher("");
      Matcher valueMatcher = Pattern.compile(valuePattern).matcher("");
      for (Map.Entry<ProtoMember, Object> entry : map.entrySet()) {
        if (nameMatcher.reset(entry.getKey().member()).matches()
            && valueMatcher.reset(String.valueOf(entry.getValue())).matches()) {
          return true;
        }
      }
      return false;
    }
docs: Returns true if any of the options in {@code options} matches both of the regular expressions
  provided: its name matches the option's name and its value matches the option's value.