public class MutableInteger
extends java.lang.Object
implements java.lang.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(java.lang.Object o)
Compares two
MutableInteger objects numerically. |
boolean |
equals(java.lang.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. |
java.lang.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(java.lang.Object o)
MutableInteger objects numerically.compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectCopyright © 2005-2011 Potix Corporation. All Rights Reserved.