/** * Propagate an object change to this node. * @param right The new object. */ public void modifyObject(Object right, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { if(!getRelevantAttributes().contains(type)) return; super.modifyObject(right, type, oldvalue, newvalue, state, mem, agenda); if(!isAffected(type)) { Collection tmem = fetchTupleMemory(state, right, mem); if(tmem!=null) { for(Iterator it=tmem.iterator(); it.hasNext(); ) { Tuple left = (Tuple)it.next(); boolean contains = isMatchContained(state, left, right, mem); // Tuple changed in memory -> propagate modification if(contains) propagateModification(left, right, left.size(), type, oldvalue, newvalue, state, mem, agenda); } } } }
/** * Propagate an object change to this node. * @param right The new object. */ public void modifyObject(Object right, OAVAttributeType type, Object oldvalue, Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda) { if(!getRelevantAttributes().contains(type)) return; super.modifyObject(right, type, oldvalue, newvalue, state, mem, agenda); if(!isAffected(type)) { Collection tmem = fetchTupleMemory(state, right, mem); if(tmem!=null) { for(Iterator it=tmem.iterator(); it.hasNext(); ) { Tuple left = (Tuple)it.next(); boolean contains = isMatchContained(state, left, right, mem); // Tuple changed in memory -> propagate modification if(contains) propagateModification(left, right, left.size(), type, oldvalue, newvalue, state, mem, agenda); } } } }