public class UpdatableInteger extends java.lang.Number implements java.lang.Comparable<UpdatableInteger>
| Constructor and Description |
|---|
UpdatableInteger()
Constructs a newly allocated UpdatableInteger object representing the
value 0 (zero).
|
UpdatableInteger(int value)
Constructs a newly allocated UpdatableInteger object representing the
value argument. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(UpdatableInteger n)
Compares two UpdatableInteger objects.
|
double |
doubleValue() |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object.
|
float |
floatValue() |
int |
hashCode()
Returns a hash code for this object.
|
int |
intValue() |
long |
longValue() |
void |
setValue(int value)
Sets the value wrapped by this object.
|
java.lang.String |
toString()
Returns a String object representing this Integer's value.
|
public UpdatableInteger()
public UpdatableInteger(int value)
value argument.public double doubleValue()
doubleValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic int compareTo(UpdatableInteger n)
compareTo in interface java.lang.Comparable<UpdatableInteger>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare with.public java.lang.String toString()
toString in class java.lang.Objectpublic void setValue(int value)
value - the new value wrapped by this object.