Code example for BigDecimal

Methods: negate

0
    private NumberFactory<BigDecimal> numberFactory;
 
    @Override 
    protected Number negateNumber(Number param) throws ParseException {
        BigDecimal val = numberFactory.createNumber(param);
        return val.negate();
    } 
 
    public MathContext getMathContext() {
        return mathContext;
    } 
 
    public void setMathContext(MathContext mathContext) {
        this.mathContext = mathContext;
    } 
 
    public void setNumberFactory(NumberFactory<BigDecimal> numberFactory) {
        this.numberFactory = numberFactory;
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java