Class LineSet


  • public class LineSet
    extends Object
    Represents a set of lines.
    Author:
    jrichard
    • Constructor Detail

    • Method Detail

      • getStartColumn

        public Integer getStartColumn​(Integer lineNum)
        Get the starting column for a given line number.
        Parameters:
        lineNum - the specified line number
        Returns:
        the starting column for the given line number
      • firstLineCol

        public int firstLineCol()
        Get the starting column for the first line.
        Returns:
        the starting column for the first line.
      • firstLine

        public int firstLine()
        Get the line number of the first line.
        Returns:
        the line number of the first line
      • lastLine

        public int lastLine()
        Get the line number of the last line.
        Returns:
        the line number of the last line
      • addLineAndCol

        public void addLineAndCol​(int lineNum,
                                  int col)
        Add a line to this set of lines.
        Parameters:
        lineNum - the line to add
        col - the starting column of the new line
      • isEmpty

        public boolean isEmpty()
        Determines if this set of lines is empty.
        Returns:
        true if it is empty, false otherwise