|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.util.MutableInt
Small wrapper class for an int
whose value can be changed.
Can be used whenever a mutable object is required, e.g. for adjustable
status codes (Integer
is immutable, int
is a
primitive).
Constructor Summary | |
MutableInt()
Creates a new instance, setting the initial value to 0. |
|
MutableInt(int initialValue)
Creates a new instance. |
Method Summary | |
int |
getValue()
Returns the wrapped int value. |
void |
setValue(int i)
Modifies the wrapped int value. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MutableInt()
public MutableInt(int initialValue)
initialValue
- the initial value to wrapMethod Detail |
public int getValue()
int
value.
public void setValue(int i)
int
value.
i
- the new valuepublic String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |