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.


Constructor Index

 o TourDate()
Constructor for a TourDate.
 o TourDate(long)
Constructor for a TourDate.

Method Index

 o setNow(long)
Calling this method sets the current date to the given date.

Constructors

 o 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().

 o TourDate
 public TourDate(long date)
Constructor for a TourDate.

Parameters:
date - The number of milliseconds since Jan. 1, 1970 00:00:00

Methods

 o 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