@Override public StringBuffer format(double number,StringBuffer result,FieldPosition fieldPosition){
  boolean tryFastPath=false;
  if (fieldPosition == DontCareFieldPosition.INSTANCE)   tryFastPath=true;
 else {
    fieldPosition.setBeginIndex(0);
    fieldPosition.setEndIndex(0);
  }
  if (tryFastPath) {
    String tempResult=fastFormat(number);
    if (tempResult != null) {
      result.append(tempResult);
      return result;
    }
  }
  return format(number,result,fieldPosition.getFieldDelegate());
}

@ Override public StringBuffer format ( double number , StringBuffer result , FieldPosition fieldPosition ) { boolean tryFastPath = false ; if ( fieldPosition == DontCareFieldPosition . INSTANCE ) tryFastPath = true ; else { fieldPosition . setBeginIndex ( 0 ) ; fieldPosition . setEndIndex ( 0 ) ; } if ( tryFastPath ) { String tempResult = fastFormat ( number ) ; if ( tempResult != null ) { result . append ( tempResult ) ; return result ; } } return format ( number , result , fieldPosition . getFieldDelegate ( ) ) ; }
formats a double to produce a string .
