Class TextRange2d

java.lang.Object
net.sourceforge.pmd.lang.document.TextRange2d
All Implemented Interfaces:
Comparable<TextRange2d>

public final class TextRange2d extends Object implements Comparable<TextRange2d>
A place in a text document, represented as line/column information.
  • Constructor Details

    • TextRange2d

      public TextRange2d(int startLine, int startCol, int endLine, int endCol)
  • Method Details

    • getStartPos

      public TextPos2d getStartPos()
    • getEndPos

      public TextPos2d getEndPos()
    • toDisplayStringWithColon

      public String toDisplayStringWithColon()
    • getStartLine

      public int getStartLine()
    • getStartColumn

      public int getStartColumn()
    • getEndLine

      public int getEndLine()
    • getEndColumn

      public int getEndColumn()
    • range2d

      public static TextRange2d range2d(TextPos2d start, TextPos2d end)
    • range2d

      public static TextRange2d range2d(int bline, int bcol, int eline, int ecol)
    • fullLine

      public static TextRange2d fullLine(int line, int lineLength)
    • compareTo

      public int compareTo(TextRange2d o)
      Specified by:
      compareTo in interface Comparable<TextRange2d>
    • contains

      public boolean contains(TextRange2d range)
    • contains

      public boolean contains(TextPos2d pos)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object