|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectTime
public class Time
Time represented as attributes hours and minutes.
| Constructor Summary | |
|---|---|
Time()
Constructor for objects of class Time that sets time to zero (0:00). |
|
Time(int minutes)
Constructor for objects of class Time that sets time to the number of minutes specified. |
|
Time(int hours,
int minutes)
Constructor for objects of class Time that sets time to the number of hours and minutes specified. |
|
| Method Summary | |
|---|---|
boolean |
equals(Time t)
Determine if two Time objects are equal. |
int |
getHours()
Retrieve the hours. |
int |
getMinutes()
Retrieve the minutes. |
Time |
increment(Time timeIncrement)
Create a new Time object whose value is the current object's time incremented by the parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Time()
public Time(int minutes)
minutes - the number of minutes
public Time(int hours,
int minutes)
hours - the number of hoursminutes - the number of minutes| Method Detail |
|---|
public int getHours()
public int getMinutes()
public Time increment(Time timeIncrement)
null is equivalent to new Time().
timeIncrement - the amount to increment by
public boolean equals(Time t)
false if the specified Time is null.)
t - the Time object to compare with this Time
true if the hours and minutes are the same; false otherwise
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||