public interface PriceUtils
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
create(String number)
Translates the String representation of BigDecimal
into a BigDecimal
|
boolean |
eq(BigDecimal price1,
BigDecimal price2)
Test if two BigDecimals are equivalent
|
boolean |
isNegative(BigDecimal price)
Test if this BigDecimal is strictly lower than zero
|
boolean |
isZero(BigDecimal price)
Test if this BigDecimal is equivalent to zero
|
BigDecimal |
round(BigDecimal price)
This method return a half down rounded price
|
BigDecimal create(String number)
number - String representationBigDecimal round(BigDecimal price)
price - immutable input priceboolean isZero(BigDecimal price)
price - to compare with zeroboolean eq(BigDecimal price1, BigDecimal price2)
price1 - 1st BigDecimal to testprice2 - 2nd BigDecimal to testboolean isNegative(BigDecimal price)
price - input priceCopyright © 2015. All rights reserved.