Class SourceLocation

java.lang.Object
gov.nasa.pds.tools.label.SourceLocation

public final class SourceLocation
extends Object
Implements an object that stores a line, column, and location in a source document.
  • Constructor Details

    • SourceLocation

      public SourceLocation​(int line, int column, String url)
      Creates a new instance with a given line, column number and url of the source.
      Parameters:
      line - the source line number, or -1 if not available
      column - the source column number, or -1 if not available
      url - the source location, or null if not available
  • Method Details

    • getLineNumber

      public int getLineNumber()
      Gets the source line number.
      Returns:
      the source line number, or -1 if not available
    • getColumnNumber

      public int getColumnNumber()
      Gets the source column number.
      Returns:
      the source column number, or -1 if not available.
    • getUrl

      public String getUrl()
      Gets the url of the source location.
      Returns:
      the url, or null if not available.
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object