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