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 intcompareTo(TextRange2d o)booleancontains(TextPos2d pos)booleancontains(TextRange2d range)booleanequals(Object o)static TextRange2dfullLine(int line, int lineLength)intgetEndColumn()intgetEndLine()TextPos2dgetEndPos()intgetStartColumn()intgetStartLine()TextPos2dgetStartPos()inthashCode()static TextRange2drange2d(int bline, int bcol, int eline, int ecol)static TextRange2drange2d(TextPos2d start, TextPos2d end)StringtoDisplayStringWithColon()StringtoString()
-
-
-
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:
compareToin interfaceComparable<TextRange2d>
-
contains
public boolean contains(TextRange2d range)
-
contains
public boolean contains(TextPos2d pos)
-
-