|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--reservations.DateGenerator
A helper class to generate Dates in the future.
| Constructor Summary | |
DateGenerator()
|
|
DateGenerator(java.util.Date initialTime)
|
|
| Method Summary | |
java.util.Date |
future(int day,
int hour,
int minute)
returns a Date for some random time in the future as determined by the input parameters. |
static java.util.Date |
genTime(java.util.Date d,
boolean before)
Return a Date for a random number of hours (1 to 6) and minutes either before or after the given Date. |
java.util.Date |
now()
Returns a new Date object representing the current time that this DataGenerator currently uses. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateGenerator()
public DateGenerator(java.util.Date initialTime)
| Method Detail |
public java.util.Date future(int day,
int hour,
int minute)
day - - maximum number of days in the futurehour - - maximum number of hours to addpublic java.util.Date now()
public static java.util.Date genTime(java.util.Date d,
boolean before)
d - Date that is the basis for the generated Datebefore - whether time should be before or after indicated Date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||