@NotThreadSafe public class MutableShort extends AbstractMutableInteger<MutableShort>
| Constructor and Description |
|---|
MutableShort(int nValue)
Initialize with a certain int value.
|
MutableShort(Number aValue)
Initialize with a certain value.
|
MutableShort(short nValue)
Initialize with a certain value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MutableShort rhs) |
int |
dec() |
int |
dec(int nDelta) |
int |
dec(Number aDelta) |
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. |
MutableShort |
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. |
EChange |
set(int nValue) |
EChange |
set(Number aValue) |
EChange |
set(short nValue) |
short |
shortValue()
Returns the value of the specified number as a
short, which may
involve rounding or truncation. |
String |
toString() |
onAfterChangeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisOddgetAsBigDecimal, getAsBigInteger, getAsByte, getAsCharacter, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsShort, isNot0isEQ, isGE, isGT, isLE, isLT, isNEthisAsTpublic MutableShort(int nValue)
nValue - The value to be used.public MutableShort(@Nonnull Number aValue)
aValue - The value to be used.public MutableShort(short nValue)
nValue - The value to be used.public short shortValue()
INumbershort, which may
involve rounding or truncation.
This implementation returns the result of INumber.intValue() cast to a
short.
shortValue in interface INumbershortValue in class Numbershort.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 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 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 MutableShort rhs)
@Nonnull public MutableShort getClone()
Copyright © 2014–2017 Philip Helger. All rights reserved.