|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.zcu.kiv.vsp.msloup.util.Counter
public class Counter
Trida pocitadla. Ve tride je zarucena atomicita operaci pro odecitani, pricitani.
Constructor Summary | |
---|---|
Counter(long initialValue)
Konstruktor tridy s udanim pocatecni hodnoty |
Method Summary | |
---|---|
long |
dec()
Snizi hodnotu pocitadla o jednicku a vrati novou hodnotu |
long |
getValue()
Vrati aktualni hodnotu pocitadla |
long |
inc()
Zvedne hodnotu pocitadla o jednicku a vrati novou hodnotu |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Counter(long initialValue)
initialValue
- pocatecni hodnotaMethod Detail |
---|
public long inc()
public long dec()
public long getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |