|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.me.jstott.sun.Time
public class Time
Class to represent a time (hh:mm.ss) object. For more information on using this class, look at http://www.jstott.me.uk/jsuntimes/
| Constructor Summary | |
|---|---|
Time(int h,
int m,
double s)
Create a time object |
|
| Method Summary | |
|---|---|
int |
getHours()
|
int |
getMinutes()
|
double |
getSeconds()
|
void |
setHours(int hours)
|
void |
setMinutes(int minutes)
|
void |
setRoundedSeconds(boolean r)
Determines whether the seconds should be rounded to the nearest whole value when using the toString() method. |
void |
setSeconds(double seconds)
|
java.lang.String |
toString()
Return a String representation of the Time |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Time(int h,
int m,
double s)
h - hoursm - minutes - seconds| Method Detail |
|---|
public void setRoundedSeconds(boolean r)
r - true to cause seconds to be roundedpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int getHours()
public void setHours(int hours)
hours - The hours to set.public int getMinutes()
public void setMinutes(int minutes)
minutes - The minutes to set.public double getSeconds()
public void setSeconds(double seconds)
seconds - The seconds to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||