@NotThreadSafe public class MutableInt extends AbstractMutableInteger<MutableInt>
| Constructor and Description |
|---|
MutableInt(int nValue)
Initialize with a certain value.
|
MutableInt(Number aValue)
Initialize with a certain value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MutableInt rhs) |
int |
dec() |
int |
dec(int nDelta) |
int |
dec(Number aDelta) |
int |
divide(int nDivisor) |
int |
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. |
MutableInt |
getClone() |
int |
hashCode() |
int |
inc()
Increment by 1 and return the modified value.
|
int |
inc(int nDelta) |
int |
inc(Number aDelta) |
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. |
int |
multiply(int nMultiplicand) |
int |
multiply(Number aMultiplicand) |
EChange |
set(int 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 MutableInt(@Nonnull Number aValue)
aValue - The value to be used.public MutableInt(int nValue)
nValue - The value to be used.public int intValue()
INumberint, 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 long longValue()
INumberlong, which may
involve rounding or truncation.public int inc()
public int inc(int nDelta)
public int dec()
public int dec(int nDelta)
public int divide(int nDivisor)
public int multiply(int 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 int compareTo(@Nonnull MutableInt rhs)
@Nonnull public MutableInt getClone()
Copyright © 2014–2020 Philip Helger. All rights reserved.