Class LineColumn
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.LineColumn
-
- All Implemented Interfaces:
Comparable<LineColumn>
public class LineColumn extends Object implements Comparable<LineColumn>
Immutable line and column numbers.
-
-
Constructor Summary
Constructors Constructor Description LineColumn(int line, int column)
Constructs a new pair of line and column numbers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LineColumn lineColumn)
boolean
equals(Object other)
int
getColumn()
Gets the zero-based column number.int
getLine()
Gets the one-based line number.int
hashCode()
-
-
-
Constructor Detail
-
LineColumn
public LineColumn(int line, int column)
Constructs a new pair of line and column numbers.- Parameters:
line
- the one-based line numbercolumn
- the zero-based column number
-
-
Method Detail
-
getLine
public int getLine()
Gets the one-based line number.- Returns:
- the one-based line number
-
getColumn
public int getColumn()
Gets the zero-based column number.- Returns:
- the zero-based column number
-
compareTo
public int compareTo(LineColumn lineColumn)
- Specified by:
compareTo
in interfaceComparable<LineColumn>
-
-