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.Number
public float floatValue()
floatValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public int compareTo(UpdatableInteger n)
compareTo
in interface java.lang.Comparable<UpdatableInteger>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with.public java.lang.String toString()
toString
in class java.lang.Object
public void setValue(int value)
value
- the new value wrapped by this object.