|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectTimer
NamedTimer
public class NamedTimer
A countdown timer with a name as well as minutes and seconds. The timer does not go less than zero.
| Constructor Summary | |
|---|---|
NamedTimer(java.lang.String name)
construct a NamedTimer with a String name and default time |
|
NamedTimer(java.lang.String name,
int minutes)
construct a NamedTimer with a String name as well as minutes (value should be positive) |
|
NamedTimer(java.lang.String name,
int minutes,
int seconds)
construct a NamedTimer with a String name as well as minutes and seconds of timer (combined value should be positive) |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
get the name of the NamedTimer |
void |
setName(java.lang.String name)
set the name of the NamedTimer |
java.lang.String |
toString()
builds a string of the timer's value in name > time form |
| Methods inherited from class Timer |
|---|
outOfTime, set, set, set, subtract |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NamedTimer(java.lang.String name,
int minutes,
int seconds)
name - String name for newly constructed timerminutes - number of minutes on newly constructed timerseconds - number of seconds on newly constructed timer
public NamedTimer(java.lang.String name,
int minutes)
name - String name for newly constructed timerminutes - number of minutes on newly constructed timerpublic NamedTimer(java.lang.String name)
name - String name for newly constructed timer| Method Detail |
|---|
public void setName(java.lang.String name)
name - String name of the timerpublic java.lang.String getName()
public java.lang.String toString()
toString in class Timer
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||