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 TypeMethodDescriptionintReturns the column number associated with the FilePosition object.booleanCompares this FilePosition object with the specified object for equality.filePath()Returns the file path as a Path object.inthashCode()Returns the hash code value for the FilePosition object.intReturns 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:
serializedPositionin 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:
lineNumberin 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:
columnNumberin 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.
-