|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCounterCollector
Clock
public class Clock
Clock class
Constructor Summary | |
---|---|
Clock()
Clock constructor |
Method Summary | |
---|---|
java.lang.String |
getHrs()
Clock hour value getter |
java.lang.String |
getMin()
Clock minute value getter |
java.lang.String |
getSec()
Clock second value getter |
java.lang.String |
getValue()
Clock global value (hour, minute, second) getter |
java.lang.String |
getValue(java.lang.String format)
Clock global value (hour, minute, second) getter with format arg |
Clock |
setFormat(java.lang.String format)
Clock output format setter |
Clock |
setHrs(int hrs)
Clock hour value setter |
Clock |
setMin(int min)
Clock minute value setter |
Clock |
setSec(int sec)
Clock second value setter |
Clock |
setValue(int hrs,
int min,
int sec)
Clock global value (hours, minute, second) setter |
java.lang.String |
toString()
Clock default output method (outputs with Clock.format ) |
Clock |
work()
Clock work method (this makes the clock working) |
Clock |
workOnce()
Clock work once method (same as Clock.work() but loops one time). |
Methods inherited from class CounterCollector |
---|
decrement, getCounter, increment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Clock()
Method Detail |
---|
public Clock work()
java.lang.InterruptedException
- Thread.sleep() errorpublic Clock workOnce()
java.lang.InterruptedException
- Thread.sleep() errorpublic Clock setFormat(java.lang.String format)
String
- format The new output format (need to include %h%, %m% and %s%)
public Clock setHrs(int hrs)
int
- hrs The new hour value to set
public Clock setMin(int min)
int
- min The new minute value to set
public Clock setSec(int sec)
int
- sec The new second value to set
public Clock setValue(int hrs, int min, int sec)
int
- hrs The new hour value to setint
- min The new minute value to setint
- sec The new second value to setpublic java.lang.String getHrs()
public java.lang.String getMin()
public java.lang.String getSec()
public java.lang.String getValue()
Clock.format
) valuepublic java.lang.String getValue(java.lang.String format)
String
- format The on-demand wanted format value (see Clock.setFormat
).
public java.lang.String toString()
Clock.format
)
toString
in class java.lang.Object
Clock.format
) value
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |