for (int i=0; i<artifacts.size(); i++) {
artifact = artifacts.get(i);
path = artifact.getPath();
if (available.contains(path)) {
if (artifact.getLastModified() <= since) { available.remove(path); continue; }
changes.add(new VirtualArtifactChange(watched, path, Type.MODIFIED, artifact.getLastModified()));
} else {
paths.add(path);
changes.add(new VirtualArtifactChange(watched, path, Type.NEW, artifact.getLastModified()));
}
available.remove(path);
}
for (int a=0; a<available.size(); a++) {
changes.add(new VirtualArtifactChange(watched, available.get(a), Type.REMOVED, check));
paths.remove(available.get(a));
}
return changes.size() == 0 ? null : changes;
}