numObj = currFile.nextObject(clientData.id); if (numObj != null) clientData.objectsInProgress.put(numObj.uid(), numObj);
if ((currFile == null || !currFile.moreObjectsToRead()) && unopenedFiles.size() > 0) { gotoNextFile(clientId); } numObj = getObjectFromCurrFileAndAssignToClient(clientData);
  public synchronized NumberedObject nextObject(int clientId)    throws RemoteException {    ClientData clientData = checkValidClient("nextObject", clientId);    NumberedObject numObj = null;    if (toProcess.size() == 0) {      numObj = currFile.nextObject(clientData.id);      if (numObj != null)	clientData.objectsInProgress.put(numObj.uid(), numObj);    }    else {      numObj = (NumberedObject)toProcess.removeLast();      clientData.objectsInProgress.put(numObj.uid(), numObj);      if (verbose)	log("nextObject: got object " + numObj.uid() + " off of deque",	    clientId);    }    // start timer if this is the first object of switchboard's life    if (timer == null)      timer = new Time();    if (currFile.done()) {      synchronized (consumers) {	if (consumers.size() > 0) {	  Iterator it = consumers.iterator();	  while (it.hasNext()) {	    Consumer c = (Consumer)it.next();	    c.processingComplete(currFile.inName, currFile.outName);	  }	}      }    }    return numObj;  }