Package com.github.javaparser
Class Range
- java.lang.Object
-
- com.github.javaparser.Range
-
public class Range extends Object
A range of characters in a source file, from "begin" to "end", including the characters at "begin" and "end".
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Range other)
As strictlyContains, but two exactly matching ranges are also considered contained one in each other.boolean
equals(Object o)
int
getLineCount()
int
hashCode()
boolean
isAfter(Position position)
boolean
isBefore(Position position)
static Range
range(int beginLine, int beginColumn, int endLine, int endColumn)
static Range
range(Position begin, Position end)
boolean
strictlyContains(Range other)
Do this strictly contains other? It means that this has to be larger than other and it has to start as other or before and end as other or after.String
toString()
Range
withBegin(Position begin)
Range
withBeginColumn(int column)
Range
withBeginLine(int line)
Range
withEnd(Position end)
Range
withEndColumn(int column)
Range
withEndLine(int line)
-
-
-
Method Detail
-
range
public static Range range(int beginLine, int beginColumn, int endLine, int endColumn)
-
withBeginColumn
public Range withBeginColumn(int column)
-
withBeginLine
public Range withBeginLine(int line)
-
withEndColumn
public Range withEndColumn(int column)
-
withEndLine
public Range withEndLine(int line)
-
contains
public boolean contains(Range other)
As strictlyContains, but two exactly matching ranges are also considered contained one in each other.
-
strictlyContains
public boolean strictlyContains(Range other)
Do this strictly contains other? It means that this has to be larger than other and it has to start as other or before and end as other or after.
-
isBefore
public boolean isBefore(Position position)
-
isAfter
public boolean isAfter(Position position)
-
getLineCount
public int getLineCount()
-
-