Class 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()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 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 interface java.lang.Comparable<LineColumn>
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object