|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.oddjob.schedules.SimpleInterval
public class SimpleInterval
A Simple implementation of an {@link Interval).
| Field Summary |
|---|
| Fields inherited from interface org.oddjob.schedules.Interval |
|---|
END_OF_TIME, START_OF_TIME |
| Constructor Summary | |
|---|---|
SimpleInterval(Date on)
|
|
SimpleInterval(Date from,
Date to)
Constructor for an interval between two dates. |
|
SimpleInterval(Interval other)
The copy constructor. |
|
SimpleInterval(long fromTime,
long toTime)
Constructor for an interval between two dates given as milliseconds. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Test if two intervals are equivalent. |
Date |
getFromDate()
The date the interval is from which includes this date. |
Date |
getToDate()
The date the interval is up to but excluding. |
int |
hashCode()
Crude implementation of hashCode, so intervals could be stored in HashSets. |
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 SimpleInterval(Date on)
on -
public SimpleInterval(Date from,
Date to)
from - The starting date.to - The ending date.
public SimpleInterval(long fromTime,
long toTime)
fromTime - toTime - public SimpleInterval(Interval other)
other - The other interval.| Method Detail |
|---|
public Date getFromDate()
Interval
getFromDate in interface Intervalpublic Date getToDate()
Interval
getToDate in interface Intervalpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
Intervals are equivalent if there start and end times are the same.
equals in class Objectother - The interval to test against.
public String toString()
toString in class Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||