Class InputPosition

java.lang.Object
org.neo4j.graphdb.InputPosition

public final class InputPosition extends Object
An input position refers to a specific point in a query string.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final InputPosition
    The empty position
  • Constructor Summary

    Constructors
    Constructor
    Description
    InputPosition(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
    boolean
     
    int
    The column number referred to by the position; column numbers start at 1.
    int
    The line number referred to by the position; line numbers start at 1.
    int
    The character offset referred to by this position; offset numbers start at 0.
    int
     
     
  • Field Details

    • empty

      public static final InputPosition empty
      The empty position
  • Constructor Details

    • InputPosition

      public InputPosition(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

    • getOffset

      public int getOffset()
      The character offset referred to by this position; offset numbers start at 0.
      Returns:
      the offset of this position.
    • getLine

      public int getLine()
      The line number referred to by the position; line numbers start at 1.
      Returns:
      the line number of this position.
    • getColumn

      public int getColumn()
      The column number referred to by the position; column numbers start at 1.
      Returns:
      the column number of this position.
    • equals

      public boolean equals(Object o)
    • hashCode

      public int hashCode()
    • toString

      public String toString()