@NotThreadSafe public final class MutableLong extends Number implements IMutableInteger<MutableLong>
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_VALUE
The default value if the default constructor is used.
|
| Constructor and Description |
|---|
MutableLong()
Initialize with default value 0L.
|
MutableLong(long nValue)
Initialize with a certain value.
|
MutableLong(Long aValue)
Initialize with a certain value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MutableLong rhs) |
long |
dec() |
long |
dec(long nDelta) |
double |
doubleValue() |
boolean |
equals(Object o) |
float |
floatValue() |
Long |
getAsLong() |
MutableLong |
getClone() |
int |
hashCode() |
long |
inc()
Increment by 1 and return the modified value.
|
long |
inc(long nDelta) |
int |
intValue() |
boolean |
is0() |
boolean |
isEven() |
boolean |
isGreater0() |
boolean |
isGreaterOrEqual0() |
boolean |
isNot0() |
boolean |
isOdd() |
boolean |
isSmaller0() |
boolean |
isSmallerOrEqual0() |
long |
longValue() |
EChange |
set(long nValue) |
String |
toString() |
byteValue, shortValuepublic static final long DEFAULT_VALUE
public MutableLong()
public MutableLong(@Nonnull Long aValue)
aValue - The value to be used.public MutableLong(long nValue)
nValue - The value to be used.public float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic long inc()
public long inc(long nDelta)
public long dec()
public long dec(long nDelta)
public boolean is0()
is0 in interface IMutableNumeric<MutableLong>true if the value is 0public boolean isNot0()
isNot0 in interface IMutableNumeric<MutableLong>true if the value is not 0public boolean isSmaller0()
isSmaller0 in interface IMutableNumeric<MutableLong>true if the value is < 0public boolean isSmallerOrEqual0()
isSmallerOrEqual0 in interface IMutableNumeric<MutableLong>true if the value is ≤ 0public boolean isGreater0()
isGreater0 in interface IMutableNumeric<MutableLong>true if the value is > 0public boolean isGreaterOrEqual0()
isGreaterOrEqual0 in interface IMutableNumeric<MutableLong>true if the value is ≥ 0public boolean isEven()
isEven in interface IMutableInteger<MutableLong>true if the value is evenpublic boolean isOdd()
isOdd in interface IMutableInteger<MutableLong>true if the value is oddpublic int compareTo(@Nonnull MutableLong rhs)
compareTo in interface Comparable<MutableLong>@Nonnull public MutableLong getClone()
getClone in interface ICloneable<MutableLong>Copyright © 2006–2015 phloc systems. All rights reserved.