|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.xbase.lib.BigDecimalExtensions
public class BigDecimalExtensions
This is an extension library for big decimal numbers
.
Constructor Summary | |
---|---|
BigDecimalExtensions()
|
Method Summary | |
---|---|
static java.math.BigDecimal |
operator_divide(java.math.BigDecimal a,
java.math.BigDecimal b)
The binary divide operator. |
static java.math.BigDecimal |
operator_minus(java.math.BigDecimal a)
The unary minus operator. |
static java.math.BigDecimal |
operator_minus(java.math.BigDecimal a,
java.math.BigDecimal b)
The binary minus operator. |
static java.math.BigDecimal |
operator_multiply(java.math.BigDecimal a,
java.math.BigDecimal b)
The binary times operator. |
static java.math.BigDecimal |
operator_plus(java.math.BigDecimal a,
java.math.BigDecimal b)
The binary plus operator. |
static java.math.BigDecimal |
operator_power(java.math.BigDecimal a,
int exponent)
The power operator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BigDecimalExtensions()
Method Detail |
---|
public static java.math.BigDecimal operator_minus(java.math.BigDecimal a)
minus
operator.
a
- a BigDecimal. May not be null
.
-a
java.lang.NullPointerException
- if a
is null
.public static java.math.BigDecimal operator_plus(java.math.BigDecimal a, java.math.BigDecimal b)
plus
operator.
a
- a BigDecimal. May not be null
.b
- a BigDecimal. May not be null
.
a.add(b)
java.lang.NullPointerException
- if a
or b
is null
.public static java.math.BigDecimal operator_minus(java.math.BigDecimal a, java.math.BigDecimal b)
minus
operator.
a
- a BigDecimal. May not be null
.b
- a BigDecimal. May not be null
.
a.subtract(b)
java.lang.NullPointerException
- if a
or b
is null
.public static java.math.BigDecimal operator_power(java.math.BigDecimal a, int exponent)
power
operator.
a
- a BigDecimal. May not be null
.exponent
- the exponent.
a.pow(b)
java.lang.NullPointerException
- if a
is null
.public static java.math.BigDecimal operator_multiply(java.math.BigDecimal a, java.math.BigDecimal b)
times
operator.
a
- a BigDecimal. May not be null
.b
- a BigDecimal. May not be null
.
a.multiply(b)
java.lang.NullPointerException
- if a
or b
is null
.public static java.math.BigDecimal operator_divide(java.math.BigDecimal a, java.math.BigDecimal b)
divide
operator.
a
- a BigDecimal. May not be null
.b
- a BigDecimal. May not be null
.
a.divide(b, MathContext.DECIMAL128)
java.lang.NullPointerException
- if a
or b
is null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |