|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJFlex.Interval
public final class Interval
An intervall of characters with basic operations.
| Field Summary | |
|---|---|
char |
end
|
char |
start
|
| Constructor Summary | |
|---|---|
Interval(char start,
char end)
Constuct a new intervall from start to end. |
|
Interval(Interval other)
Copy constructor |
|
| Method Summary | |
|---|---|
boolean |
contains(char point)
Return true iff point is contained in this intervall. |
boolean |
contains(Interval other)
Return true iff this intervall completely contains the
other one. |
Interval |
copy()
Make a copy of this interval. |
boolean |
equals(java.lang.Object o)
Return true if o is an intervall
with the same borders. |
void |
setEnd(char end)
Set a new last character |
void |
setStart(char start)
Set a new first character |
java.lang.String |
toString()
Get a String representation of this intervall. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public char start
public char end
| Constructor Detail |
|---|
public Interval(char start,
char end)
start to end.
start - first character the intervall should containend - last character the intervall should containpublic Interval(Interval other)
| Method Detail |
|---|
public boolean contains(char point)
true iff point is contained in this intervall.
point - the character to checkpublic boolean contains(Interval other)
true iff this intervall completely contains the
other one.
other - the other intervallpublic boolean equals(java.lang.Object o)
true if o is an intervall
with the same borders.
equals in class java.lang.Objecto - the object to check equality withpublic void setEnd(char end)
end - the new last character of this intervallpublic void setStart(char start)
start - the new first character of this intervallpublic java.lang.String toString()
toString in class java.lang.Object"[start-end]" or
"[start]" (if there is only one character in
the intervall) where start and
end are either a number (the character code)
or something of the from 'a'.public Interval copy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||