|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.expasy.jpl.commons.base.CounterImpl
public final class CounterImpl
CounterImpl is a simple counter and a better alternative than Integer as a new instance is created each time you want to set the value.
| Method Summary | |
|---|---|
CounterImpl |
clone()
Creates and returns a copy of this CounterImpl. |
void |
decrement()
Decrement counter by 1. |
void |
decrement(int dec)
Decrement counter by dec. |
boolean |
equals(Object o)
|
int |
getCount()
|
int |
hashCode()
|
void |
increment()
Increment counter by 1. |
void |
increment(int inc)
Increment counter by inc. |
static CounterImpl |
newInstance()
A basic static factory method. |
void |
reset()
reinitialising object |
String |
toString()
|
static CounterImpl |
valueOf(int start)
A type-conversion static factory method. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static CounterImpl newInstance()
CounterImpl initialized to 0.public static CounterImpl valueOf(int start)
CounterImpl with the given value.public void reset()
Resetable
reset in interface ResetableResetable.reset()public CounterImpl clone()
CounterImpl.
clone in interface ExplicitlyCloneableclone in class ObjectObject.clone()public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic void increment()
increment in interface Counterpublic void increment(int inc)
inc.
increment in interface Counterpublic void decrement()
decrement in interface Counterpublic void decrement(int dec)
dec.
decrement in interface Counterpublic int getCount()
getCount in interface Counterpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||