public void renameDocument(String oldName, String newName) { DocumentImpl doc; for (Iterator i = documents.iterator(); i.hasNext();) { doc = (DocumentImpl) i.next(); if (doc.getFileName().equals(oldName)) { doc.setFileName(newName); return; } }
synchronized public void renameDocument(String oldName, String newName) { DocumentImpl doc = (DocumentImpl)documents.remove(oldName); doc.setFileName(newName); if(doc != null) documents.put(newName, doc);
	public void renameDocument(String oldName, String newName) {		DocumentImpl doc;		for (Iterator i = documents.iterator(); i.hasNext();) {			doc = (DocumentImpl) i.next();			if (doc.getFileName().equals(oldName)) {				doc.setFileName(newName);				return;			}		}	}