Class Position

    • Field Detail

      • line

        public final int line
      • column

        public final int column
      • HOME

        public static final Position HOME
        The first position in the file
    • Constructor Detail

      • Position

        public Position​(int line,
                        int column)
    • Method Detail

      • pos

        public static Position pos​(int line,
                                   int column)
        Convenient factory method.
      • withColumn

        public Position withColumn​(int column)
      • withLine

        public Position withLine​(int line)
      • valid

        public boolean valid()
        Check if the position is usable. Does not know what it is pointing at, so it can't check if the position is after the end of the source.
      • invalid

        public boolean invalid()
      • isAfter

        public boolean isAfter​(Position position)
      • isBefore

        public boolean isBefore​(Position position)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object