Code example for BigDecimal

Methods: divide, doubleValue

0
   */ 
  public Object getValue()
  { 
    final BigDecimal total = (BigDecimal) totalSumFunction.getValue();
 
    if (total == null || total.doubleValue() == 0)
    { 
      return null; 
    } 
    if (scaleToHundred)
    { 
      return currentValue.multiply(ItemPercentageFunction.HUNDRED).divide(total, scale, roundingMode);
    } 
    else 
    { 
      return currentValue.divide(total, scale, roundingMode);
    } 
  } 
 
  /** 
   * Returns a clone of the function. <P> Be aware, this does not create a deep copy. If you have complex strucures