Class Range

java.lang.Object
com.day.util.diff.Range

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

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

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

    Modifier and Type
    Method
    Description
    int
    len()
    Returns the length of this range
    Returns a string suitable for inclusion in a diff output (line number is incremented by one).
    Returns a debug string

    Methods inherited from class java.lang.Object

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

    • 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 Details

    • 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 Details

    • 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