Modifier and Type | Field and Description |
---|---|
private int |
endColNo
Number of last column of the comment.
|
private int |
endLineNo
Number of last line of the comment.
|
private int |
startColNo
Number of first column of the comment.
|
private int |
startLineNo
Number of first line of the comment.
|
private java.lang.String[] |
text
Text of the comment.
|
Constructor and Description |
---|
Comment(java.lang.String[] text,
int firstCol,
int lastLine,
int lastCol)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getEndColNo()
The column in the input file where the text block ends.
|
int |
getEndLineNo()
The last line of the text block in the input file.
|
int |
getStartColNo()
The column in the input file where the text block starts.
|
int |
getStartLineNo()
The line in the input file where the text block starts.
|
java.lang.String[] |
getText()
The text content of the text block.
|
boolean |
intersects(int startLine,
int startCol,
int endLine,
int endCol)
Checks if this comment intersects with a specified
part of the file.
|
java.lang.String |
toString() |
private final java.lang.String[] text
private final int startLineNo
private final int endLineNo
private final int startColNo
private final int endColNo
public Comment(java.lang.String[] text, int firstCol, int lastLine, int lastCol)
text
- the lines that make up the comment.firstCol
- number of the first column of the comment.lastLine
- number of the last line of the comment.lastCol
- number of the last column of the comment.public final java.lang.String[] getText()
TextBlock
public final int getStartLineNo()
TextBlock
getStartLineNo
in interface TextBlock
public final int getEndLineNo()
TextBlock
getEndLineNo
in interface TextBlock
public int getStartColNo()
TextBlock
getStartColNo
in interface TextBlock
public int getEndColNo()
TextBlock
getEndColNo
in interface TextBlock
public boolean intersects(int startLine, int startCol, int endLine, int endCol)
TextBlock
intersects
in interface TextBlock
startLine
- the starting line number in the filestartCol
- the starting column number in the fileendLine
- the ending line number in the fileendCol
- the ending column number in the filepublic java.lang.String toString()
toString
in class java.lang.Object