|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.treesched.Interval
A representation of an interval between two dates.
| Constructor Summary | |
Interval(java.util.Date at)
Constructor for an interval that is for ever from the date. |
|
Interval(java.util.Date from,
java.util.Date to)
Constructor for an interval between two dates. |
|
Interval(Interval other)
The copy constructor. |
|
Interval(long fromTime)
Constructor for an interval between a date given as milliseconds and for ever. |
|
Interval(long fromTime,
long toTime)
Constructor for an interval between two dates given as milliseconds. |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
Test if two interval are equivelent. |
java.util.Date |
getFromDate()
Get the from date of the interval. |
java.util.Date |
getToDate()
Get the to date of the interval. |
int |
hashCode()
Crude implementation of hashCode, so intervals could be stored in HashSets. |
boolean |
isBefore(Interval other)
Test if this interval is before the other interval. |
boolean |
isPast(Interval other)
Test if this interval is past the other interval. |
Interval |
limit(Interval limit)
Limit the interval. |
java.lang.String |
toString()
Return a string representation of this interval. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Interval(java.util.Date at)
at - the start date for the inerval.
public Interval(java.util.Date from,
java.util.Date to)
from - The starting date.to - The ending date.public Interval(long fromTime)
fromTime - The date given in milliseconds.
public Interval(long fromTime,
long toTime)
fromTime - toTime - public Interval(Interval other)
other - The other interval.| Method Detail |
public java.util.Date getFromDate()
public java.util.Date getToDate()
public int hashCode()
public boolean equals(java.lang.Object other)
Intervals are equivelant if there start and end times are the same.
other - The interval to test against.
public boolean isBefore(Interval other)
This happens when this from time is less than other from time.
this: ---- or ---- other: ---- ----
other -
public boolean isPast(Interval other)
This happens when the this from time is greater than the other ones to time.
this: ---- other: ----
public Interval limit(Interval limit)
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||