JFlex
public final class Interval extends Object
| 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(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
|
| String | toString()
Get a String representation of this intervall.
|
start to end.
Parameters: start first character the intervall should contain end last character the intervall should contain
true iff point is contained in this intervall.
Parameters: point the character to check
true iff this intervall completely contains the
other one.
Parameters: other the other intervall
Returns: the copy
true if o is an intervall
with the same borders.
Parameters: o the object to check equality with
Parameters: end the new last character of this intervall
Parameters: start the new first character of this intervall
Returns: a string "[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'.