Class Day

Class Day

java.lang.Object
   |
   +----Month
           |
           +----Day

public final class Day
extends Month
Day is a generic object for keeping the day.
See Also:
Month

Variable Index

 o day
The day.

Constructor Index

 o Day()
Creates a new Day, with day, month, and year set to 0.
 o Day(int, int, int)
Creates a new Day, with month, day, and year set as specified.
 o Day(Date)
Creates a new Day, using the information in the given Date object.
 o Day(int, Month)
Creates a new Day, given the day and Month object.

Method Index

 o equals(Object)
Compares this Day to the specified Object.
 o hashCode()
Returns a hash code for this Day.
 o toString()
Returns a new String object representing the Day.

Variables

 o day
  public int day
The day.

Constructors

 o Day
  public Day()
Creates a new Day, with day, month, and year set to 0.
 o Day
  public Day(int m,
             int d,
             int y)
Creates a new Day, with month, day, and year set as specified.
Parameters:
m - the value for the month
d - the value for the day
y - the value for the year
 o Day
  public Day(Date date)
Creates a new Day, using the information in the given Date object.
Parameters:
date - the Date object to get info from
 o Day
  public Day(int d,
             Month m)
Creates a new Day, given the day and Month object.
Parameters:
d - the day of the month
m - the Month object to get info from

Methods

 o toString
  public String toString()
Returns a new String object representing the Day.
Overrides:
toString in class Month
See Also:
String
 o hashCode
  public int hashCode()
Returns a hash code for this Day.
Overrides:
hashCode in class Month
See Also:
Hashtable
 o equals
  public boolean equals(Object o)
Compares this Day to the specified Object. Returns true if the Object is equal to this Day; that is, has the same day, month, and year.
Parameters:
o - the object to compare this Day against.
Returns:
true if the Days are equal; false otherwise.
Overrides:
equals in class Month