Class Time

Class Time

java.lang.Object
   |
   +----Time

public class Time
extends Object
Time is a generic object for keeping the time.

Variable Index

 o hour
The hour.
 o minute
The minute.

Constructor Index

 o Time(int, int)
Creates a new time from the specified hours and minutes.
 o Time(Date)
Creates a new Time object based on the given Date object.
 o Time()
Creates a new, empty Time object.

Method Index

 o equals(Object)
Compares this Time to the specified Object.
 o hashCode()
Returns the hash code associated with this Time object.
 o toString()
Returns a new String representing the time.

Variables

 o hour
  public int hour
The hour.
 o minute
  public int minute
The minute.

Constructors

 o Time
  public Time(int h,
              int m)
Creates a new time from the specified hours and minutes.
Parameters:
h - the hours
m - the minutes
 o Time
  public Time(Date d)
Creates a new Time object based on the given Date object.
Parameters:
d - the Date object to create the Time from
See Also:
Date
 o Time
  public Time()
Creates a new, empty Time object.

Methods

 o toString
  public String toString()
Returns a new String representing the time.
Overrides:
toString in class Object
 o hashCode
  public int hashCode()
Returns the hash code associated with this Time object.
Overrides:
hashCode in class Object
See Also:
Hashtable
 o equals
  public boolean equals(Object o)
Compares this Time to the specified Object. Returns true if the Object is equal to this Time; that is, has the same hour and minute.
Parameters:
o - the object to compare this Time against.
Returns:
true if the Times are equal; false otherwise.
Overrides:
equals in class Object