|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccs.utils.WritableInteger
public class WritableInteger
This class is similar to an Integer, except you can write to it and the static utility methods aren't there. There are circumstances where you want to put a mutable integer into a container as a value (not suitable as a key), but without causing a garbage geyser if you have to change it a lot. MT-UNSAFE.
Constructor Summary | |
---|---|
WritableInteger(int value)
Create a WritableInteger wrapping the given value. |
Method Summary | |
---|---|
void |
decrement()
Decrement, the -- operator on a primitive int. |
int |
getValue()
Get. |
void |
increment()
Increment, the ++ operator on a primitive int. |
void |
setValue(int value)
Set. |
java.lang.String |
toString()
This integer as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WritableInteger(int value)
value
- The value.Method Detail |
---|
public int getValue()
public void setValue(int value)
value
- the value of the integer.public void increment()
public void decrement()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |