Class LineColumn
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.LineColumn
-
- All Implemented Interfaces:
java.lang.Comparable<LineColumn>
public class LineColumn extends java.lang.Object implements java.lang.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(java.lang.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 interfacejava.lang.Comparable<LineColumn>
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-