Class LinePosition

java.lang.Object
org.variantsync.boosting.position.Position
org.variantsync.boosting.position.LinePosition
All Implemented Interfaces:
Serializable

public class LinePosition extends Position
Represents a position in a file with line and column numbers.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    LinePosition(String filePosition, int lineNumber, int columnNumber)
    Constructs a LinePosition object with the specified file position, line number, and column number.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the column number of the line.
    boolean
    Compares this LinePosition object to the specified object for equality.
    Returns the file path of the file that contains the line.
    int
    Returns a hash code value for the LinePosition object.
    int
    Returns the line number of the line.
    Returns a serialized representation of the LinePosition object.

    Methods inherited from class org.variantsync.boosting.position.Position

    fromSerializedPosition

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LinePosition

      public LinePosition(String filePosition, int lineNumber, int columnNumber)
      Constructs a LinePosition object with the specified file position, line number, and column number.
      Parameters:
      filePosition - the file position
      lineNumber - the line number
      columnNumber - the column number
  • Method Details

    • equals

      public boolean equals(Object o)
      Compares this LinePosition object to the specified object for equality.
      Specified by:
      equals in class Position
      Parameters:
      o - the object to compare to
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Returns a hash code value for the LinePosition object.
      Specified by:
      hashCode in class Position
      Returns:
      the hash code value
    • serializedPosition

      public String[] serializedPosition()
      Returns a serialized representation of the LinePosition object.
      Specified by:
      serializedPosition in class Position
      Returns:
      an array of strings representing the serialized position
    • filePath

      public Path filePath()
      Returns the file path of the file that contains the line.
      Specified by:
      filePath in class Position
      Returns:
      the file path
    • lineNumber

      public int lineNumber()
      Returns the line number of the line.
      Specified by:
      lineNumber in class Position
      Returns:
      the line number
    • columnNumber

      public int columnNumber()
      Returns the column number of the line.
      Specified by:
      columnNumber in class Position
      Returns:
      the column number