|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 | |
Object |
clone()
Return a cloned copy of this object. |
int |
decrement()
Decrement the counter. |
boolean |
equals(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 |
makeDirectional(Counter counter,
boolean increasing)
Returns a directional counter. |
static Counter |
makeSynchronized(Counter 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 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(Object obj)
obj
- Object to test equality with.
public String toString()
public Object clone()
public static Counter makeSynchronized(Counter counter)
counter
- Counter to synchronize.
public static Counter makeDirectional(Counter counter, boolean increasing)
counter
- Counter 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 |