!7 // not tested on null values sclass FieldIndex implements IConceptIndex { //Concepts concepts; Class c; S field; new HashMap objectToValue; new MultiMap valueToObject; *() {} *(Concepts concepts, Class *c, S *field) { for (Concept c : list(concepts, c)) update(c); } public void update(Concept c) { O newValue = cget(c, field); O oldValue = objectToValue.get(c); if (newValue != oldValue) { valueToObject.remove(oldValue, c); valueToObject.add(newValue, c); objectToValue.put(c, value); } } public void remove(Concept c) { O value = cget(c, field); objectToValue.remove(c); valueToObject.remove(value, c); } } p { }