Record Class InternalInputPosition

java.lang.Object
java.lang.Record
org.neo4j.driver.internal.summary.InternalInputPosition
All Implemented Interfaces:
InputPosition

public record InternalInputPosition(int offset, int line, int column) extends Record implements InputPosition
An input position refers to a specific point in a query string.
  • Constructor Summary

    Constructors
    Constructor
    Description
    InternalInputPosition(int offset, int line, int column)
    Creating a position from and offset, line number and a column number.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the column record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the line record component.
    int
    Returns the value of the offset record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • InternalInputPosition

      public InternalInputPosition(int offset, int line, int column)
      Creating a position from and offset, line number and a column number.
      Parameters:
      offset - the offset from the start of the string, starting from 0.
      line - the line number, starting from 1.
      column - the column number, starting from 1.
  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • offset

      public int offset()
      Returns the value of the offset record component.
      Specified by:
      offset in interface InputPosition
      Returns:
      the value of the offset record component
    • line

      public int line()
      Returns the value of the line record component.
      Specified by:
      line in interface InputPosition
      Returns:
      the value of the line record component
    • column

      public int column()
      Returns the value of the column record component.
      Specified by:
      column in interface InputPosition
      Returns:
      the value of the column record component