public abstract static class Line.Set extends Object
Line
object, assuming it has a line number.
Mappings of line numbers to line objects will survive modifications of the text, and continue to represent the original lines as close as possible. For example: if a new line is inserted at the 10th line of a document and the compiler module asks for the 25th line (because the compiler reports an error at line 25 in the saved file) via the line set, the 26th line of the current document will be marked as being in error.
Constructor and Description |
---|
Set()
Create a new snapshot.
|
Modifier and Type | Method and Description |
---|---|
abstract Line |
getCurrent(int line)
Find line object representing the line in current document.
|
Date |
getDate()
Get creation time for this line set.
|
abstract List<? extends Line> |
getLines()
Returns a set of line objects sorted by their
line numbers.
|
abstract Line |
getOriginal(int line)
Find line object in the line set corresponding to original line number.
|
int |
getOriginalLineNumber(Line line)
Finds an original line number for given line in this line set.
|
public abstract List<? extends Line> getLines()
public final Date getDate()
public abstract Line getOriginal(int line) throws IndexOutOfBoundsException
line
- number of the line (starting at 0)IndexOutOfBoundsException
- if line
is an invalid index for the original set of linespublic abstract Line getCurrent(int line) throws IndexOutOfBoundsException
line
- number of the line in current state of the document (starting at 0)IndexOutOfBoundsException
- if line
is an invalid index for the original set of linespublic int getOriginalLineNumber(Line line)
line
- the line to look for