Class Range


  • public class Range
    extends java.lang.Object
    Specifies a range in a document
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Document doc
      the document this range points to
      int high
      the high line of this range.
      int low
      the low line of this range
    • Constructor Summary

      Constructors 
      Constructor Description
      Range​(Document doc, int low, int high)
      Creates a new range
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int len()
      Returns the length of this range
      java.lang.String toRangeString()
      Returns a string suitable for inclusion in a diff output (line number is incremented by one).
      java.lang.String toString()
      Returns a debug string
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • doc

        public final Document doc
        the document this range points to
      • low

        public final int low
        the low line of this range
      • high

        public final int high
        the high line of this range. actually points to the line after the one included in this range.
    • Constructor Detail

      • Range

        public Range​(Document doc,
                     int low,
                     int high)
        Creates a new range
        Parameters:
        doc - the document
        low - the low line
        high - the high line
    • Method Detail

      • len

        public int len()
        Returns the length of this range
        Returns:
        the length.
      • toString

        public java.lang.String toString()
        Returns a debug string
        Overrides:
        toString in class java.lang.Object
        Returns:
        a debug string
      • toRangeString

        public java.lang.String toRangeString()
        Returns a string suitable for inclusion in a diff output (line number is incremented by one).
        Returns:
        a string for output