public final class MutableLong extends java.lang.Number implements java.lang.Comparable<MutableLong>
Constructor and Description |
---|
MutableLong() |
MutableLong(long i) |
Modifier and Type | Method and Description |
---|---|
byte |
byteValue() |
int |
compareTo(MutableLong anotherMutableLong)
Compares two
MutableLong objects numerically. |
double |
doubleValue() |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object.
|
float |
floatValue() |
int |
hashCode() |
void |
incValue(long val)
Add the argument to the value of this long.
|
int |
intValue() |
long |
longValue() |
void |
set(long i) |
short |
shortValue() |
java.lang.String |
toString() |
public void set(long i)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
true
if and only if the argument is not
null
and is an MutableLong
object that
contains the same long
value as this object.
Note that a MutableLong isn't and can't be equal to an Long.equals
in class java.lang.Object
obj
- the object to compare with.true
if the objects are the same;
false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(MutableLong anotherMutableLong)
MutableLong
objects numerically.compareTo
in interface java.lang.Comparable<MutableLong>
anotherMutableLong
- the MutableLong
to be
compared.0
if this MutableLong
is
equal to the argument MutableLong
; a value less than
0
if this MutableLong
is numerically less
than the argument MutableLong
; and a value greater
than 0
if this MutableLong
is numerically
greater than the argument MutableLong
(signed
comparison).public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public byte byteValue()
byteValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public void incValue(long val)
val
- Value to be added to this long