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
Modifier and Type Method Description booleanequals(Object obj)intgetColumnNumber()Gets the source column number.intgetLineNumber()Gets the source line number.StringgetUrl()Gets the url of the source location.inthashCode()
-
Constructor Details
-
SourceLocation
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 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
Gets the url of the source location.- Returns:
- the url, or null if not available.
-
equals
-
hashCode
public int hashCode()
-