|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.LongCounter
A long integer counter class.
Constructor Summary | |
LongCounter()
Construct a LongCounter. |
|
LongCounter(long count)
Construct a LongCounter with a starting value. |
Method Summary | |
java.lang.Object |
clone()
Return a cloned copy of this object. |
long |
decrement()
Decrement the counter. |
boolean |
equals(java.lang.Object obj)
Check if the given object is equal to this. |
long |
getCount()
Return the current value of the counter. |
long |
increment()
Increment the counter. |
static LongCounter (src) |
makeDirectional(LongCounter (src) counter,
boolean increasing)
Returns a directional counter. |
static LongCounter (src) |
makeSynchronized(LongCounter (src) counter)
Return a synchronized counter. |
void |
reset()
Reset the counter to zero. |
java.lang.String |
toString()
Return a string representation of this. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LongCounter(long count)
count
- Starting value for counter.public LongCounter()
Method Detail |
public long increment()
public long decrement()
public long getCount()
public void reset()
public boolean equals(java.lang.Object obj)
obj
- Object to test equality with.
public java.lang.String toString()
public java.lang.Object clone()
public static LongCounter (src) makeSynchronized(LongCounter (src) counter)
counter
- LongCounter to synchronize.
public static LongCounter (src) makeDirectional(LongCounter (src) counter, boolean increasing)
counter
- LongCounter to make directional.increasing
- True to create an increasing only
or false to create a decreasing only.
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |