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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The zero-based column number.
    private final int
    The one-based line number.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LineColumn(int line, int column)
    Constructs a new pair of line and column numbers.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(LineColumn lineColumn)
     
    boolean
    equals(Object other)
     
    int
    Gets the zero-based column number.
    int
    Gets the one-based line number.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • line

      private final int line
      The one-based line number.
    • column

      private final int column
      The zero-based column number.
  • Constructor Details

    • LineColumn

      public LineColumn(int line, int column)
      Constructs a new pair of line and column numbers.
      Parameters:
      line - the one-based line number
      column - the zero-based column number
  • Method Details