miSim

misim.editor
Interface LineIterator

All Known Implementing Classes:
AsmLine, MacroDefinition, TextFile

public interface LineIterator


Method Summary
 int getLineIndex()
          Return the current line index being read in this file
 Line getNextLine()
          Return the next line, and advance the index to the next line in the file.
 int getType()
          Return the type of this iterator, as an integer.
 void insertLine(Line aLine)
          Insert a new line at the current line index.
 void resetLineIndex()
          Reset the current line index to the beginning of the source
 

Method Detail

resetLineIndex

public void resetLineIndex()
Reset the current line index to the beginning of the source

getNextLine

public Line getNextLine()
Return the next line, and advance the index to the next line in the file.
Returns:
The next line in the file, or null if there are no more

getLineIndex

public int getLineIndex()
Return the current line index being read in this file
Returns:
The current line index

insertLine

public void insertLine(Line aLine)
                throws EditorException
Insert a new line at the current line index. Note that the next call to getNextLine will return the line after the line just inserted.
Parameters:
aLine - The line to insert
Throws:
EditorException - if the line cannot be inserted

getType

public int getType()
Return the type of this iterator, as an integer.
Returns:
This iterator type

miSim