Class LineSet
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.indentation.LineSet
-
public class LineSet extends java.lang.ObjectRepresents a set of lines.
-
-
Constructor Summary
Constructors Constructor Description LineSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLineAndCol(int lineNum, int col)Add a line to this set of lines.intfirstLine()Get the line number of the first line.intfirstLineCol()Get the starting column for the first line.java.lang.IntegergetStartColumn(java.lang.Integer lineNum)Get the starting column for a given line number.booleanisEmpty()Determines if this set of lines is empty.intlastLine()Get the line number of the last line.java.lang.StringtoString()
-
-
-
Method Detail
-
getStartColumn
public java.lang.Integer getStartColumn(java.lang.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 addcol- 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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-