Interface TextBlock
- All Known Implementing Classes:
Comment
public interface TextBlock
A block of text from an input file that does not necessarily
have any grammatical structure.
-
Method Summary
Modifier and TypeMethodDescriptionintThe column in the input file where the text block ends.intThe last line of the text block in the input file.intThe column in the input file where the text block starts.intThe line in the input file where the text block starts.String[]getText()The text content of the text block.booleanintersects(int startLineNo, int startColNo, int endLineNo, int endColNo) Checks if this comment intersects with a specified part of the file.
-
Method Details
-
getText
The text content of the text block. Each line is represented by one array entry. The linebreak characters are not part of the text content.- Returns:
- the text content of the text block.
-
getStartLineNo
int getStartLineNo()The line in the input file where the text block starts. Counting starts from 1.- Returns:
- first line of the text block
-
getEndLineNo
int getEndLineNo()The last line of the text block in the input file. Counting starts from 1.- Returns:
- last line of the text block
-
getStartColNo
int getStartColNo()The column in the input file where the text block starts. Counting starts from 0.- Returns:
- first line of the text block
-
getEndColNo
int getEndColNo()The column in the input file where the text block ends. Counting starts from 0.- Returns:
- last line of the text block
-
intersects
Checks if this comment intersects with a specified part of the file.- Parameters:
startLineNo- the starting line number in the filestartColNo- the starting column number in the fileendLineNo- the ending line number in the fileendColNo- the ending column number in the file- Returns:
- true if the positions intersects with this comment.
-