All Packages Class Hierarchy This Package Previous Next Index
Class JBMSTours.TourDate
java.lang.Object
|
+----java.util.Date
|
+----JBMSTours.TourDate
- public class TourDate
- extends Date
This class helps with testing the JBMSTours application. It allows
one to set a date as the current date, so the caller can control
what the current date is. The output of the application depends on
the current date - by controlling it, we can ensure the application
prints the same output every time.
-
TourDate()
- Constructor for a TourDate.
-
TourDate(long)
- Constructor for a TourDate.
-
setNow(long)
- Calling this method sets the current date to the given date.
TourDate
public TourDate()
- Constructor for a TourDate. This form of the constructor gives the
current date. If setNow() has been called, it constructs the date
that was given to setNow().
TourDate
public TourDate(long date)
- Constructor for a TourDate.
- Parameters:
- date - The number of milliseconds since Jan. 1, 1970 00:00:00
setNow
public static void setNow(long now)
- Calling this method sets the current date to the given date.
- Parameters:
- now - The current date in milliseconds since Jan. 1, 1970 00:00:00
All Packages Class Hierarchy This Package Previous Next Index