com.puppycrawl.tools.checkstyle.checks.indentation

Class LineSet

public class LineSet extends Object

Represents a set of lines.

Author: jrichard

Method Summary
voidaddLineAndCol(Integer aLineNum, int aCol)
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.
IntegergetStartColumn(Integer aLineNum)
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.
StringtoString()

Method Detail

addLineAndCol

public void addLineAndCol(Integer aLineNum, int aCol)
Add a line to this set of lines.

Parameters: aLineNum the line to add aCol the starting column of the new line

firstLine

public int firstLine()
Get the line number of the first line.

Returns: the line number of the first line

firstLineCol

public int firstLineCol()
Get the starting column for the first line.

Returns: the starting column for the first line.

getStartColumn

public Integer getStartColumn(Integer aLineNum)
Get the starting column for a given line number.

Parameters: aLineNum the specified line number

Returns: the starting column for the given line number

isEmpty

public boolean isEmpty()
Determines if this set of lines is empty.

Returns: true if it is empty, false otherwise

lastLine

public int lastLine()
Get the line number of the last line.

Returns: the line number of the last line

toString

public String toString()

Returns: string representation