public synchronized float recoveredFilesPercent(){
  int total=0;
  int recovered=0;
  for (  File file : fileDetails.values()) {
    if (file.reused() == false) {
      total++;
      if (file.fullyRecovered()) {
        recovered++;
      }
    }
  }
  if (total == 0 && fileDetails.size() == 0) {
    return 0.0f;
  }
  if (total == recovered) {
    return 100.0f;
  }
 else {
    float result=100.0f * (recovered / (float)total);
    return result;
  }
}

public synchronized float recoveredFilesPercent ( ) { int total = 0 ; int recovered = 0 ; for ( File file : fileDetails . values ( ) ) { if ( file . reused ( ) == false ) { total ++ ; if ( file . fullyRecovered ( ) ) { recovered ++ ; } } } if ( total == 0 && fileDetails . size ( ) == 0 ) { return 0.0f ; } if ( total == recovered ) { return 100.0f ; } else { float result = 100.0f * ( recovered / ( float ) total ) ; return result ; } }
percent of recovered ( i . e . , not reused ) files out of the total files to be recovered
