package pt.ist.fenixframework.pstm; import java.util.HashMap; import java.util.Map; import jvstm.VBox; import jvstm.VBoxBody; public class ReadSet { private HashMap bodiesRead = new HashMap(); ReadSet(Map bodiesRead) { this.bodiesRead.putAll(bodiesRead); } public void merge(ReadSet otherReadSet) { this.bodiesRead.putAll(otherReadSet.bodiesRead); } public boolean isStillCurrent() { for (Map.Entry entry : bodiesRead.entrySet()) { if (entry.getKey().body != entry.getValue()) { return false; } } return true; } }