Class Range


  • public class Range
    extends Object
    Specifies a range in a document
    • 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 String toString()
        Returns a debug string
        Overrides:
        toString in class Object
        Returns:
        a debug string
      • toRangeString

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