Class FilePosition
java.lang.Object
org.variantsync.boosting.position.Position
org.variantsync.boosting.position.FilePosition
- All Implemented Interfaces:
Serializable
Represents the location of a file.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFilePosition
(String path) Constructs a new FilePosition object with the specified file path. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the column number associated with the FilePosition object.boolean
Compares this FilePosition object with the specified object for equality.filePath()
Returns the file path as a Path object.int
hashCode()
Returns the hash code value for the FilePosition object.int
Returns the line number associated with the FilePosition object.String[]
Returns a serialized representation of the FilePosition object.Methods inherited from class org.variantsync.boosting.position.Position
fromSerializedPosition
-
Constructor Details
-
FilePosition
Constructs a new FilePosition object with the specified file path.- Parameters:
path
- The path of the file
-
-
Method Details
-
equals
Compares this FilePosition object with the specified object for equality. -
serializedPosition
Returns a serialized representation of the FilePosition object.- Specified by:
serializedPosition
in classPosition
- Returns:
- An array containing the type "FILE" and the file path
-
filePath
Returns the file path as a Path object. -
lineNumber
public int lineNumber()Returns the line number associated with the FilePosition object.- Specified by:
lineNumber
in classPosition
- Returns:
- -1 as line number is not applicable for file positions
-
columnNumber
public int columnNumber()Returns the column number associated with the FilePosition object.- Specified by:
columnNumber
in classPosition
- Returns:
- -1 as column number is not applicable for file positions
-
hashCode
public int hashCode()Returns the hash code value for the FilePosition object.
-