@NotThreadSafe public class MutableLong extends AbstractMutableInteger<MutableLong>
| Constructor and Description |
|---|
MutableLong(long nValue)
Initialize with a certain value.
|
MutableLong(Number aValue)
Initialize with a certain value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MutableLong rhs) |
long |
dec() |
long |
dec(long nDelta) |
long |
dec(Number aDelta) |
long |
divide(long nDivisor) |
long |
divide(Number aDivisor) |
double |
doubleValue()
Returns the value of the specified number as a
double, which may
involve rounding. |
boolean |
equals(Object o) |
float |
floatValue()
Returns the value of the specified number as a
float, which may
involve rounding. |
long |
getAndInc() |
MutableLong |
getClone() |
int |
hashCode() |
long |
inc()
Increment by 1 and return the modified value.
|
long |
inc(long nDelta) |
long |
inc(Number aDelta) |
long |
incAndGet() |
int |
intValue()
Returns the value of the specified number as an
int, which may
involve rounding or truncation. |
boolean |
is0() |
boolean |
isEven() |
boolean |
isGE0() |
boolean |
isGT0() |
boolean |
isLE0() |
boolean |
isLT0() |
long |
longValue()
Returns the value of the specified number as a
long, which may
involve rounding or truncation. |
long |
multiply(long nMultiplicand) |
long |
multiply(Number aMultiplicand) |
EChange |
set(long nValue) |
EChange |
set(Number aValue) |
String |
toString() |
onAfterChangebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitisOddgetAsBigDecimal, getAsBigInteger, getAsByte, getAsCharacter, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsShort, isNot0isEQ, isGE, isGT, isLE, isLT, isNEthisAsTbyteValue, shortValuepublic MutableLong(@Nonnull Number aValue)
aValue - The value to be used.public MutableLong(long nValue)
nValue - The value to be used.public long longValue()
INumberlong, which may
involve rounding or truncation.public float floatValue()
INumberfloat, which may
involve rounding.floatValue in interface INumberfloatValue in class Numberfloat.public double doubleValue()
INumberdouble, which may
involve rounding.doubleValue in interface INumberdoubleValue in class Numberdouble.public int intValue()
INumberint, which may
involve rounding or truncation.public long inc()
public long inc(long nDelta)
public long dec()
public long dec(long nDelta)
public long divide(long nDivisor)
public long multiply(long nMultiplicand)
public boolean is0()
true if the value is 0public boolean isLT0()
true if the value is < 0public boolean isLE0()
true if the value is ≤ 0public boolean isGT0()
true if the value is > 0public boolean isGE0()
true if the value is ≥ 0public boolean isEven()
true if the value is evenpublic long getAndInc()
public long incAndGet()
public int compareTo(@Nonnull MutableLong rhs)
@Nonnull public MutableLong getClone()
Copyright © 2014–2022 Philip Helger. All rights reserved.