code: private String getPatternCode(final List<Token> tokens) {
          final StringBuilder sb = new StringBuilder();
          sb.append(tokens.size());
          for (final Token token : tokens) {
              sb.append(token.getType().ordinal());
          }
          return sb.toString();
      }
docs: Creates an almost unique String code for a list of tokens. This code is
  used to improve search time when looking for potential matching patterns.
  
  @param tokens
  @return