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 Summary
Constructors Constructor Description TextRange2d(int startLine, int startCol, int endLine, int endCol)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TextRange2d o)
boolean
contains(TextPos2d pos)
boolean
contains(TextRange2d range)
boolean
equals(Object o)
static TextRange2d
fullLine(int line, int lineLength)
int
getEndColumn()
int
getEndLine()
TextPos2d
getEndPos()
int
getStartColumn()
int
getStartLine()
TextPos2d
getStartPos()
int
hashCode()
static TextRange2d
range2d(int bline, int bcol, int eline, int ecol)
static TextRange2d
range2d(TextPos2d start, TextPos2d end)
String
toDisplayStringWithColon()
String
toString()
-
-
-
Method Detail
-
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 interfaceComparable<TextRange2d>
-
contains
public boolean contains(TextRange2d range)
-
contains
public boolean contains(TextPos2d pos)
-
-