public class MutableInteger extends Object implements Comparable
It is useful if you want to pass an integer to a method and like to keep the result of how the method modifies the value.
| Modifier and Type | Field and Description |
|---|---|
int |
value
The value of the mutable integer.
|
| Constructor and Description |
|---|
MutableInteger(int value) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MutableInteger o)
Compares two
MutableInteger objects numerically. |
int |
compareTo(Object o)
Compares two
MutableInteger objects numerically. |
boolean |
equals(Object o) |
int |
hashCode() |
int |
intValue()
Returns the value of this
MutableInteger as an int. |
void |
setValue(int value)
Sets the value of this
MutableInteger. |
String |
toString() |
public int intValue()
MutableInteger as an int.public void setValue(int value)
MutableInteger.public int compareTo(MutableInteger o)
MutableInteger objects numerically.public int compareTo(Object o)
MutableInteger objects numerically.compareTo in interface ComparableCopyright © 2018. All rights reserved.