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 intcompareTo(LineColumn lineColumn)booleanequals(java.lang.Object other)intgetColumn()Gets the zero-based column number.intgetLine()Gets the one-based line number.inthashCode()
-
-
-
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:
compareToin interfacejava.lang.Comparable<LineColumn>
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-