public class LineSet
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.SortedMap<java.lang.Integer,java.lang.Integer> |
lines
Maps line numbers to their start column.
|
| Constructor and Description |
|---|
LineSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLineAndCol(int lineNum,
int col)
Add a line to this set of lines.
|
int |
firstLine()
Get the line number of the first line.
|
int |
firstLineCol()
Get the starting column for the first line.
|
java.lang.Integer |
getStartColumn(java.lang.Integer lineNum)
Get the starting column for a given line number.
|
boolean |
isEmpty()
Determines if this set of lines is empty.
|
int |
lastLine()
Get the line number of the last line.
|
java.lang.String |
toString() |
private final java.util.SortedMap<java.lang.Integer,java.lang.Integer> lines
public java.lang.Integer getStartColumn(java.lang.Integer lineNum)
lineNum - the specified line numberpublic int firstLineCol()
public int firstLine()
public int lastLine()
public void addLineAndCol(int lineNum,
int col)
lineNum - the line to addcol - the starting column of the new linepublic boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Object