private StringBuffer format(BigDecimal number,StringBuffer result,FieldDelegate delegate){
  if (multiplier != 1) {
    number=number.multiply(getBigDecimalMultiplier());
  }
  boolean isNegative=number.signum() == -1;
  if (isNegative) {
    number=number.negate();
  }
synchronized (digitList) {
    int maxIntDigits=getMaximumIntegerDigits();
    int minIntDigits=getMinimumIntegerDigits();
    int maxFraDigits=getMaximumFractionDigits();
    int minFraDigits=getMinimumFractionDigits();
    int maximumDigits=maxIntDigits + maxFraDigits;
    digitList.set(isNegative,number,useExponentialNotation ? ((maximumDigits < 0) ? Integer.MAX_VALUE : maximumDigits) : maxFraDigits,!useExponentialNotation);
    return subformat(result,delegate,isNegative,false,maxIntDigits,minIntDigits,maxFraDigits,minFraDigits);
  }
}

private StringBuffer format ( BigDecimal number , StringBuffer result , FieldDelegate delegate ) { if ( multiplier != 1 ) { number = number . multiply ( getBigDecimalMultiplier ( ) ) ; } boolean isNegative = number . signum ( ) == - 1 ; if ( isNegative ) { number = number . negate ( ) ; } synchronized ( digitList ) { int maxIntDigits = getMaximumIntegerDigits ( ) ; int minIntDigits = getMinimumIntegerDigits ( ) ; int maxFraDigits = getMaximumFractionDigits ( ) ; int minFraDigits = getMinimumFractionDigits ( ) ; int maximumDigits = maxIntDigits + maxFraDigits ; digitList . set ( isNegative , number , useExponentialNotation ? ( ( maximumDigits < 0 ) ? Integer . MAX_VALUE : maximumDigits ) : maxFraDigits , ! useExponentialNotation ) ; return subformat ( result , delegate , isNegative , false , maxIntDigits , minIntDigits , maxFraDigits , minFraDigits ) ; } }
formats a bigdecimal to produce a string .
