|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.util.Range<T>
public class Range<T extends Comparable<T>>
Utility class for working with ranges, ranging from start to end (both inclusive).
Constructor Summary | |
---|---|
Range(T start,
T end)
Constructor for range from start to end (both inclusive). |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Range(T start, T end)
start
- Start of the rangeend
- End of the rangeMethod Detail |
---|
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 check
public int compareTo(Range<T> o)
compareTo
in interface Comparable<Range<T extends Comparable<T>>>
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |