|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.LongCounter
public class LongCounter
A long integer counter class.
Constructor Summary | |
---|---|
LongCounter()
Construct a LongCounter. |
|
LongCounter(long count)
Construct a LongCounter with a starting value. |
Method Summary | |
---|---|
Object |
clone()
Return a cloned copy of this object. |
long |
decrement()
Decrement the counter. |
boolean |
equals(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 |
makeDirectional(LongCounter counter,
boolean increasing)
Returns a directional counter. |
static LongCounter |
makeSynchronized(LongCounter counter)
Return a synchronized counter. |
void |
reset()
Reset the counter to zero. |
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(Object obj)
equals
in class Object
obj
- Object to test equality with.
public String toString()
toString
in class Object
public Object clone()
clone
in class Object
public static LongCounter makeSynchronized(LongCounter counter)
counter
- LongCounter to synchronize.
public static LongCounter makeDirectional(LongCounter counter, boolean increasing)
counter
- LongCounter to make directional.increasing
- True to create an increasing only
or false to create a decreasing only.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |