|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.parboiled.support.IndexRange
public final class IndexRange
A simple immutable container for a range of indices into an underlying InputBuffer.
| Field Summary | |
|---|---|
static IndexRange |
EMPTY
|
int |
end
The index of the character following the last character of the range. |
int |
start
The index of the first character in the range. |
| Constructor Summary | |
|---|---|
IndexRange(int start,
int end)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
isEmpty()
Determines whether this range contains no characters. |
boolean |
isFollowedBy(IndexRange other)
Determines whether this range is immediated followed by the given other one. |
boolean |
isPrecededBy(IndexRange other)
Determines whether this range immediated follows the given other one. |
int |
length()
|
IndexRange |
mergedWith(IndexRange other)
Created a new IndexRange that spans all characters between the smallest and the highest index of the two ranges. |
boolean |
overlapsWith(IndexRange other)
Determines whether this range overlaps with the given other one. |
java.lang.String |
toString()
|
boolean |
touches(IndexRange other)
Determines whether this range immediated follows or precedes the given other one. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IndexRange EMPTY
public final int start
public final int end
| Constructor Detail |
|---|
public IndexRange(int start,
int end)
| Method Detail |
|---|
public boolean isEmpty()
public int length()
public boolean overlapsWith(IndexRange other)
other - the other range
public boolean isPrecededBy(IndexRange other)
other - the other range
public boolean isFollowedBy(IndexRange other)
other - the other range
public boolean touches(IndexRange other)
other - the other range
public IndexRange mergedWith(IndexRange other)
other - the other range
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||