Package gov.nasa.pds.tools.label
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 Summary
Constructors Constructor Description SourceLocation(int line, int column, String url)
Creates a new instance with a given line, column number and url of the source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getColumnNumber()
Gets the source column number.int
getLineNumber()
Gets the source line number.String
getUrl()
Gets the url of the source location.int
hashCode()
-
-
-
Constructor Detail
-
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 availablecolumn
- the source column number, or -1 if not availableurl
- the source location, or null if not available
-
-
Method Detail
-
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.
-
-