public class Range<T extends Comparable<T>> extends Object implements Comparable<Range<T>>
| Constructor and Description |
|---|
Range(T start,
T end)
Constructor for range from start to end (both inclusive).
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Range<T> o) |
boolean |
contains(T item)
Checks whether an item is contained in this range.
|
boolean |
equals(Object o) |
T |
getEnd()
Retrieves end of the range.
|
T |
getStart()
Retrieves start of the range.
|
int |
hashCode() |
void |
setEnd(T end)
Sets end of the range.
|
void |
setStart(T start)
Sets start of the range.
|
String |
toString() |
public T getStart()
public void setStart(T start)
start - Start of the rangepublic T getEnd()
public void setEnd(T end)
end - End of the rangepublic boolean contains(T item)
item - Item to checkpublic int compareTo(Range<T> o)
compareTo in interface Comparable<Range<T extends Comparable<T>>>© Copyright 2005-2006, Stripes Development Team.