Class Location


  • public final class Location
    extends Object
    Координаты элемента в тексте.
    Начальная позиция: fromLine = 1; fromOffset = 0
    • Constructor Detail

      • Location

        public Location​(int fromLine,
                        int fromOffset,
                        int toLine,
                        int toOffset)
        Конструктор
        Parameters:
        fromLine - строка начала элемента
        fromColumn - смещение начала элемента
        toLine - строка конца элемента
        toColumn - смещение конца элемента
    • Method Detail

      • getFromLine

        public int getFromLine()
        Returns:
        the fromLine
      • getToLine

        public int getToLine()
        Returns:
        the toLine
      • getFromOffset

        public int getFromOffset()
        Returns:
        the fromOffset
      • getToOffset

        public int getToOffset()
        Returns:
        the toOffset
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Output format: [fromLine, fromOffset; toLine, toOffset]
        Overrides:
        toString in class Object