@NotThreadSafe public class MutableInt extends AbstractMutableInteger<MutableInt>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_VALUE
The default value if the default constructor is used.
|
| Constructor and Description |
|---|
MutableInt()
Initialize with default value 0.
|
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() |
boolean |
equals(Object o) |
float |
floatValue() |
MutableInt |
getClone() |
int |
hashCode() |
int |
inc()
Increment by 1 and return the modified value.
|
int |
inc(int nDelta) |
int |
inc(Number aDelta) |
int |
intValue() |
boolean |
is0() |
boolean |
isEven() |
boolean |
isGreater0() |
boolean |
isGreaterOrEqual0() |
boolean |
isSmaller0() |
boolean |
isSmallerOrEqual0() |
long |
longValue() |
int |
multiply(int nMultiplicand) |
int |
multiply(Number aMultiplicand) |
EChange |
set(int nValue) |
EChange |
set(Number aValue) |
String |
toString() |
getAsBigDecimal, getAsBigInteger, getAsByte, getAsCharacter, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsShort, onAfterChangebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitisOddgetAsBigDecimal, getAsBigInteger, getAsByte, getAsCharacter, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsShort, isNot0thisAsTpublic static final int DEFAULT_VALUE
public MutableInt()
public MutableInt(@Nonnull Number aValue)
aValue - The value to be used.public MutableInt(int nValue)
nValue - The value to be used.public float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic 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 isSmaller0()
true if the value is < 0public boolean isSmallerOrEqual0()
true if the value is ≤ 0public boolean isGreater0()
true if the value is > 0public boolean isGreaterOrEqual0()
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–2016 Philip Helger. All rights reserved.