Class Location

java.lang.Object
nu.validator.source.Location
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Location>

public final class Location
extends java.lang.Object
implements java.lang.Comparable<Location>, java.lang.Cloneable
Immutable source location with zero-based indexes. Cannot point to a line break.
Version:
$Id$
Author:
hsivonen
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(Location o)  
    boolean equals​(java.lang.Object obj)  
    int getColumn()
    Returns the column.
    int getLine()
    Returns the line.
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • compareTo

      public int compareTo​(Location o)
      Specified by:
      compareTo in interface java.lang.Comparable<Location>
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
      See Also:
      Object.equals(java.lang.Object)
    • getColumn

      public int getColumn()
      Returns the column.
      Returns:
      the column
    • getLine

      public int getLine()
      Returns the line.
      Returns:
      the line
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
      See Also:
      Object.hashCode()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
      See Also:
      Object.toString()