code: public boolean hasNext()
      {
          if ( _matcher == null )
          {
              return false;
          }
          if ( _literal != null || _token != null )
          {
              return true;
          }
          if ( _matcher.find() )
          {
              _literal = _template.subSequence( _endPrevios, _matcher.start() ).toString();
              _token = _matcher.group();
              _endPrevios = _matcher.end();
          }
          else if ( _endPrevios < _template.length() )
          {
              // We're at the end
              _literal = _template.subSequence( _endPrevios, _template.length() ).toString();
              _endPrevios = _template.length();
  
              // Remove the matcher so it doesn't reset itself
              _matcher = null;
          }
          return _literal != null || _token != null;
      }
docs: Returns true if there are more literals or tokens/delimiters.