public final class Range extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator<Range> |
DEPENDENCY_ORDER_COMPARATOR
Sorts Ranges so that a Range will be preceeded by any Ranges that enclose
it.
|
static Comparator<Range> |
SOURCE_ORDER_COMPARATOR
Sorts Ranges into the order in which they would appear in the source code
based on start position and end position.
|
Constructor and Description |
---|
Range(int start,
int end)
Constructor.
|
Range(int start,
int end,
int startLine,
int startColumn,
int endLine,
int endColumn)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Range o)
Return
true if the given Range lies wholly within the Range. |
boolean |
equals(Object obj) |
int |
getEnd() |
int |
getEndColumn() |
int |
getEndLine() |
int |
getStart() |
int |
getStartColumn() |
int |
getStartLine() |
int |
hashCode() |
int |
length() |
String |
toString()
For debugging use only.
|
public static final Comparator<Range> DEPENDENCY_ORDER_COMPARATOR
public static final Comparator<Range> SOURCE_ORDER_COMPARATOR
public Range(int start, int end)
start
- must be non-negativeend
- must be greater than or equal to start
public Range(int start, int end, int startLine, int startColumn, int endLine, int endColumn)
start
- must be non-negativeend
- must be greater than or equal to start
public boolean contains(Range o)
true
if the given Range lies wholly within the Range.public int getEnd()
public int getEndColumn()
public int getEndLine()
public int getStart()
public int getStartColumn()
public int getStartLine()
public int length()
Copyright © 2018. All rights reserved.