Class DefaultTextPointer

  • All Implemented Interfaces:
    java.lang.Comparable<TextPointer>, TextPointer

    public class DefaultTextPointer
    extends java.lang.Object
    implements TextPointer
    Since:
    5.2
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultTextPointer​(int line, int lineOffset)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(TextPointer o)  
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      int line()
      The logical line where this pointer is located.
      int lineOffset()
      The offset of this pointer in the current line.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DefaultTextPointer

        public DefaultTextPointer​(int line,
                                  int lineOffset)
    • Method Detail

      • line

        public int line()
        Description copied from interface: TextPointer
        The logical line where this pointer is located. First line is 1.
        Specified by:
        line in interface TextPointer
      • lineOffset

        public int lineOffset()
        Description copied from interface: TextPointer
        The offset of this pointer in the current line. First position in a line is 0.
        Specified by:
        lineOffset in interface TextPointer
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(TextPointer o)
        Specified by:
        compareTo in interface java.lang.Comparable<TextPointer>