public static class GenMath.MutableInteger
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
MutableInteger(int value)
Constructor creates a MutableInteger object with an initial value.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(int value)
Method to add the value of this MutableInteger.
|
void |
decrement()
Method to increment this MutableInteger by 1.
|
void |
increment()
Method to increment this MutableInteger by 1.
|
int |
intValue()
Method to return the value of this MutableInteger.
|
void |
setValue(int value)
Method to change the value of this MutableInteger.
|
java.lang.String |
toString()
Returns a printable version of this MutableInteger.
|
public MutableInteger(int value)
value
- the initial value.public void setValue(int value)
value
- the new value.public void addValue(int value)
value
- the value to add.public void increment()
public void decrement()
public int intValue()
public java.lang.String toString()
toString
in class java.lang.Object