Code example for Formatter

Methods: flushformattoString

0
    return formatData(JSON_FORMAT);
  } 
 
  private String formatData(String formatStr)
  { 
    Formatter fmt = new Formatter();
    fmt.format(formatStr,
               _config.getCapacity(), _config.getBucketsNum(), _config.getDropNum(),
               1.0 * _addTime / (2.0 * DATA_POINTS_NUM) - _procTime / 300000.0 ,
               1.0 * _calcTime);
    fmt.flush();
    return fmt.toString();
  } 
 
  @Override 
  public String toString()
  { 
    return toJsonString(); 
  } 
 
Connect your IDE to all the code out there  Get Codota for Java