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