code: public List<Token> getTokens(final String logFormat) {
          if (StringUtils.isBlank(logFormat)) {
              return null;
          }
  
          final List<Token> result = new ArrayList<>(5); // Usually a good guess
  
          int offset = 0;
          while (true) {
              final Token token = getNextToken(logFormat, offset);
              if (token == null) {
                  break;
              }
              result.add(token);
              offset = token.getStartPos() + token.getLength();
          }
          return result;
      }
docs: --------------------------------------------