code: public int expect(Match args[]) throws MalformedPatternException, Exception {
          logger.trace("Searching for " + args.length + " patterns in the reader stream");
          List<Match> pairs = new ArrayList<>();
          for (int i = 0; i < args.length; i++) {
              Match match = args[i];
              pairs.add(match);
          }
          return expect(pairs);
      }
docs: Attempts to detect the patterns contained in the {@link Match}
  list and executes their associated {@link Closure}s if any are
  detected.
  @param args the list of patterns and associated {@link Closure}s
  to execute
  @return the number of times the pattern is found,
  or an error code
  @throws MalformedPatternException if the pattern(s) is/are invalid
  @throws Exception if a generic error is encountered while
  processing the {@link Closure}