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.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.