code: private static boolean matchesPatternList(final String str, final List<Pattern> patterns) {
          if (patterns != null) {
              for (final Pattern pattern : patterns) {
                  if (pattern.matcher(str).matches()) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Check if a string matches one of the patterns in the provided list.
  
  @param str
  the string to test
  @param patterns
  the patterns
  @return true, if successful