|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTime
public class Time
Holds a time instance (hrs, mins, secs).
Constructor Summary | |
---|---|
Time()
Default constructor for objects of class Time. |
|
Time(int inTTLsecs)
Constructor for objects of class Time. |
|
Time(int inhrs,
int inmins,
int insecs)
Constructor for objects of class Time. |
Method Summary | |
---|---|
Time |
getDifference(Time endTime)
get the difference between times. |
int |
getHrs()
get the hrs. |
int |
getMins()
get the mins. |
int |
getSecs()
get the secs. |
int |
getTotalSecs()
get the number of secs represented by the Time object. |
void |
setHrs(int inhrs)
set the hrs. |
void |
setMins(int inmins)
set the mins. |
void |
setSecs(int insecs)
set the secs. |
String |
toString()
format a String with the time as HH:MM:SS. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Time()
public Time(int inTTLsecs)
inTTLsecs
- total seconds.public Time(int inhrs, int inmins, int insecs)
inhrs
- hrs of time.inmins
- mins of time.insecs
- secs of time.Method Detail |
---|
public Time getDifference(Time endTime)
endTime
- The end time.
public int getHrs()
public int getMins()
public int getSecs()
public int getTotalSecs()
public void setHrs(int inhrs)
inhrs
- hrs of the time.public void setMins(int inmins)
inmins
- mins of the time.public void setSecs(int insecs)
insecs
- secs of the time.public String toString()
toString
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |