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
-
day
- The day.
-
Day()
- Creates a new Day, with day, month, and year set to 0.
-
Day(int, int, int)
- Creates a new Day, with month, day, and year set as specified.
-
Day(Date)
- Creates a new Day, using the information in the given Date object.
-
Day(int, Month)
- Creates a new Day, given the day and Month object.
-
equals(Object)
- Compares this Day to the specified Object.
-
hashCode()
- Returns a hash code for this Day.
-
toString()
- Returns a new String object representing the Day.
day
public int day
- The day.
Day
public Day()
- Creates a new Day, with day, month, and year set to 0.
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
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
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
toString
public String toString()
- Returns a new String object representing the Day.
- Overrides:
- toString in class Month
- See Also:
- String
hashCode
public int hashCode()
- Returns a hash code for this Day.
- Overrides:
- hashCode in class Month
- See Also:
- Hashtable
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