Interface Position

All Superinterfaces:
Comparable<Position>
All Known Implementing Classes:
InternalPosition

public interface Position extends Comparable<Position>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
    static int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Position
    at​(int line, int column)
     
    int
    The column number at the specified line.
    int
    The column offset at the specified line.
    boolean
    isAfter​(Position other)
     
    boolean
    isBefore​(Position other)
     
    int
    The line number in a file.
    int
    The line offset in a file.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Field Details

  • Method Details

    • line

      int line()
      The line number in a file. First line number is 1.
    • lineOffset

      int lineOffset()
      The line offset in a file. First line offset is 0. (lineOffset() == line() - 1)
    • column

      int column()
      The column number at the specified line. First column number is 1. (column() == columnOffset() + 1)
    • columnOffset

      int columnOffset()
      The column offset at the specified line. First column offset is 0. (columnOffset() == column() - 1)
    • at

      static Position at(int line, int column)
    • isBefore

      boolean isBefore(Position other)
    • isAfter

      boolean isAfter(Position other)