| 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()
TextBlockpublic final int getStartLineNo()
TextBlockgetStartLineNo in interface TextBlockpublic final int getEndLineNo()
TextBlockgetEndLineNo in interface TextBlockpublic int getStartColNo()
TextBlockgetStartColNo in interface TextBlockpublic int getEndColNo()
TextBlockgetEndColNo in interface TextBlockpublic boolean intersects(int startLine, int startCol, int endLine, int endCol)
TextBlockintersects in interface TextBlockstartLine - 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.ObjectCopyright © 2001-2022. All Rights Reserved.