|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.Counter
An integer counter class.
Constructor Summary | |
Counter()
Construct a Counter. |
|
Counter(int count)
Construct a Counter with a starting value. |
Method Summary | |
java.lang.Object |
clone()
Return a cloned copy of this object. |
int |
decrement()
Decrement the counter. |
boolean |
equals(java.lang.Object obj)
Check if the given object is equal to this. |
int |
getCount()
Return the current value of the counter. |
int |
increment()
Increment the counter. |
static Counter (src) |
makeDirectional(Counter (src) counter,
boolean increasing)
Returns a directional counter. |
static Counter (src) |
makeSynchronized(Counter (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 Counter(int count)
count
- Starting value for counter.public Counter()
Method Detail |
public int increment()
public int decrement()
public int 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 Counter (src) makeSynchronized(Counter (src) counter)
counter
- Counter to synchronize.
public static Counter (src) makeDirectional(Counter (src) counter, boolean increasing)
counter
- Counter 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 |