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 Type
    Method
    Description
    int
    The column in the input file where the text block ends.
    int
    The last line of the text block in the input file.
    int
    The column in the input file where the text block starts.
    int
    The line in the input file where the text block starts.
    The text content of the text block.
    boolean
    intersects(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

      The line in the input file where the text block starts. Counting starts from 1.
      Returns:
      first line of the text block
    • getEndLineNo

      The last line of the text block in the input file. Counting starts from 1.
      Returns:
      last line of the text block
    • getStartColNo

      The column in the input file where the text block starts. Counting starts from 0.
      Returns:
      first line of the text block
    • getEndColNo

      The column in the input file where the text block ends. Counting starts from 0.
      Returns:
      last line of the text block
    • intersects

      boolean intersects(int startLineNo, int startColNo, int endLineNo, int endColNo)
      Checks if this comment intersects with a specified part of the file.
      Parameters:
      startLineNo - the starting line number in the file
      startColNo - the starting column number in the file
      endLineNo - the ending line number in the file
      endColNo - the ending column number in the file
      Returns:
      true if the positions intersects with this comment.