Class TokenIterator

java.lang.Object
org.fife.ui.rsyntaxtextarea.TokenIterator
All Implemented Interfaces:
Iterator<Token>

class TokenIterator extends Object implements Iterator<Token>
Allows you to iterate through all paintable tokens in an RSyntaxDocument.
Version:
1.0
  • Field Details

  • Constructor Details

    • TokenIterator

      TokenIterator(RSyntaxDocument doc)
      Constructor.
      Parameters:
      doc - The document whose tokens we should iterate over.
  • Method Details

    • getLineCount

      private int getLineCount()
    • hasNext

      public boolean hasNext()
      Returns whether any more paintable tokens are in the document.
      Specified by:
      hasNext in interface Iterator<Token>
      Returns:
      Whether there are any more paintable tokens.
      See Also:
    • loadTokenListForCurLine

      private void loadTokenListForCurLine()
    • next

      public Token next()
      Returns the next paintable token in the document.
      Specified by:
      next in interface Iterator<Token>
      Returns:
      The next paintable token in the document.
      See Also:
    • remove

      public void remove()
      Always throws UnsupportedOperationException, as Token removal is not supported.
      Specified by:
      remove in interface Iterator<Token>
      Throws:
      UnsupportedOperationException - always.