6 public class FileMonitor {
10 files = new HashMap();
13 public void addFile(File aFile) {
14 files.put(aFile, new Long(aFile.lastModified()));
21 public boolean hasChanged() {
22 Iterator i = files.entrySet().iterator();
25 Map.Entry entry = (Map.Entry) i.next();
26 File file = (File) entry.getKey();
27 Long lastModified = (Long) entry.getValue();
29 if (lastModified.longValue()!=file.lastModified())