code: @Override
      public MatchResult matches(List<String> lines) {
  
          // if the first line doesn't have '$RXN' then it can't match
          if (lines.size() < 1 || !lines.get(0).contains("$RXN")) return NO_MATCH;
  
          // check the header (fifth line)
          String header = lines.size() > 4 ? lines.get(4) : "";
  
          // atom count
          if (header.length() < 3 || !Character.isDigit(header.charAt(2))) return NO_MATCH;
          // bond count
          if (header.length() < 6 || !Character.isDigit(header.charAt(5))) return NO_MATCH;
  
          // check the rest of the header is only spaces and digits
          if (header.length() > 6) {
              String remainder = header.substring(6).trim();
              for (int i = 0; i < remainder.length(); ++i) {
                  char c = remainder.charAt(i);
                  if (!(Character.isDigit(c) || Character.isWhitespace(c))) {
                      return NO_MATCH;
                  }
              }
          }
  
          return new MatchResult(true, this, 0);
      }
docs: {@inheritDoc}