@NotThreadSafe public final class MutableBigDecimal extends Number implements IMutableNumeric<MutableBigDecimal>
BigDecimal so that it can be passed a final
object but is mutable.| Modifier and Type | Field and Description |
|---|---|
static BigDecimal |
DEFAULT_VALUE
The default value if the default constructor is used.
|
| Constructor and Description |
|---|
MutableBigDecimal()
Initialize with default value
|
MutableBigDecimal(BigDecimal aValue) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MutableBigDecimal rhs) |
BigDecimal |
dec() |
BigDecimal |
dec(BigDecimal aDelta) |
double |
doubleValue() |
boolean |
equals(Object o) |
float |
floatValue() |
BigDecimal |
getAsBigDecimal() |
Double |
getAsDouble() |
MutableBigDecimal |
getClone() |
int |
hashCode() |
BigDecimal |
inc()
Increment by 1 and return the modified value.
|
BigDecimal |
inc(BigDecimal aDelta) |
int |
intValue() |
boolean |
is0() |
boolean |
isGreater0() |
boolean |
isGreaterOrEqual0() |
boolean |
isNot0() |
boolean |
isSmaller0() |
boolean |
isSmallerOrEqual0() |
long |
longValue() |
EChange |
set(BigDecimal aValue) |
String |
toString() |
byteValue, shortValuepublic static final BigDecimal DEFAULT_VALUE
public MutableBigDecimal()
public MutableBigDecimal(@Nonnull BigDecimal aValue)
@Nonnull public BigDecimal getAsBigDecimal()
public double doubleValue()
doubleValue in class Numberpublic float floatValue()
floatValue in class Number@Nonnull public BigDecimal inc()
@Nonnull public BigDecimal inc(@Nonnull BigDecimal aDelta)
@Nonnull public BigDecimal dec()
@Nonnull public BigDecimal dec(@Nonnull BigDecimal aDelta)
@Nonnull public EChange set(@Nonnull BigDecimal aValue)
public boolean is0()
is0 in interface IMutableNumeric<MutableBigDecimal>true if the value is 0public boolean isNot0()
isNot0 in interface IMutableNumeric<MutableBigDecimal>true if the value is not 0public boolean isSmaller0()
isSmaller0 in interface IMutableNumeric<MutableBigDecimal>true if the value is < 0public boolean isSmallerOrEqual0()
isSmallerOrEqual0 in interface IMutableNumeric<MutableBigDecimal>true if the value is ≤ 0public boolean isGreater0()
isGreater0 in interface IMutableNumeric<MutableBigDecimal>true if the value is > 0public boolean isGreaterOrEqual0()
isGreaterOrEqual0 in interface IMutableNumeric<MutableBigDecimal>true if the value is ≥ 0public int compareTo(@Nonnull MutableBigDecimal rhs)
compareTo in interface Comparable<MutableBigDecimal>@Nonnull public MutableBigDecimal getClone()
getClone in interface ICloneable<MutableBigDecimal>Copyright © 2006–2014 phloc systems. All rights reserved.