public final class BlockCompare extends Object
BlockCompare.contains()
means that block X fully contains Y.Modifier and Type | Method and Description |
---|---|
boolean |
after()
Check if block X is after block Y.
|
boolean |
before()
Check if block X is before block Y.
|
boolean |
contains()
Check if block X contains block Y.
|
boolean |
containsStrict()
Check if X contains Y but X and Y are not equal.
|
boolean |
emptyX()
Check if block X is empty.
|
boolean |
emptyY()
Check if block Y is empty.
|
boolean |
equal()
Check if block X has the same boundaries as block Y.
|
boolean |
equalEnd()
Check if block X and Y have same end offset.
|
boolean |
equalStart()
Check if block X and Y have same start offset.
|
static BlockCompare |
get(int xStartOffset,
int xEndOffset,
int yStartOffset,
int yEndOffset)
Compare block X and Y.
|
boolean |
inside()
Check if block X is contained in block Y.
|
boolean |
insideStrict()
Check if X is inside Y but X and Y are not equal.
|
boolean |
invalidX()
Check if block X has invalid bounds (start offset higher than its end offset).
|
boolean |
invalidY()
Check if block Y has invalid bounds (start offset higher than its end offset).
|
boolean |
lowerEnd()
Check if block X ends lower than Y.
|
boolean |
lowerStart()
Check if block X starts lower than Y.
|
boolean |
overlap()
Check if there's an overlap at start or end.
|
boolean |
overlapEnd()
Check if block X overlaps block Y at its end.
|
boolean |
overlapStart()
Check if block X overlaps block Y at its begining.
|
String |
toString() |
public static BlockCompare get(int xStartOffset, int xEndOffset, int yStartOffset, int yEndOffset)
xStartOffset
- start offset of block X.xEndOffset
- end offset of block X must be >=xStartOffset.yStartOffset
- start offset of block Y.yEndOffset
- end offset of block Y must be >=yStartOffset.public boolean before()
public boolean after()
public boolean inside()
public boolean insideStrict()
public boolean contains()
public boolean containsStrict()
public boolean equal()
public boolean overlap()
overlapStart() || overlapEnd()
.public boolean overlapStart()
public boolean overlapEnd()
public boolean emptyX()
public boolean emptyY()
public boolean invalidX()
public boolean invalidY()
public boolean equalStart()
public boolean equalEnd()
public boolean lowerStart()
public boolean lowerEnd()