code: public Token createToken(final String tokenString, final int offset,
        final int length) {
      final Token token = new Token();
      token.setTokenValue(tokenString);
      if (this.addOffsets) {
        token.setStartOffset(offset);
        token.setTokenLength(length);
      }
      return token;
    }
docs: Constructs a Token as a String with corresponding offsets and length from
  which to calculate start and end position of the Token. (Does not take
  substring).
  
  @param tokenString
  string to be added to a Token object
  @param offset
  the starting offset of the Token
  @param length
  of the string
  @return a new Token object