public boolean finished(){
synchronized (finished) {
    return finished.cardinality() == workers.length;
  }
}

public boolean finished ( ) { synchronized ( finished ) { return finished . cardinality ( ) == workers . length ; } }
returns if the scan is finished
