/** * Check the consistency of the node. */ public boolean checkNodeConsistency(ReteMemory mem) { boolean consistent = true; Collection tuples = getNodeMemory(mem); Collection objects = getObjectSource().getNodeMemory(mem); if(tuples!=null) { for(Iterator it=tuples.iterator(); consistent && it.hasNext(); ) { Tuple tuple = (Tuple)it.next(); consistent = objects.contains(tuple.getObject()); } } Object node = this; while(node instanceof IObjectConsumerNode) node = ((IObjectConsumerNode)node).getObjectSource(); ((ReteNode)node).checked.add(this); return consistent; } }
/** * Check the consistency of the node. */ public boolean checkNodeConsistency(ReteMemory mem) { boolean consistent = true; Collection tuples = getNodeMemory(mem); Collection objects = getObjectSource().getNodeMemory(mem); if(tuples!=null) { for(Iterator it=tuples.iterator(); consistent && it.hasNext(); ) { Tuple tuple = (Tuple)it.next(); consistent = objects.contains(tuple.getObject()); } } Object node = this; while(node instanceof IObjectConsumerNode) node = ((IObjectConsumerNode)node).getObjectSource(); ((ReteNode)node).checked.add(this); return consistent; } }
INode right = ((BetaNode)nodes[n]).getObjectSource(); if(left!=null && right!=null)
&& (((BetaNode)context.getLastBetaNode()).getTupleSource()==leftnode || ((BetaNode)context.getLastBetaNode()).getTupleSource() instanceof LeftInputAdapterNode && ((LeftInputAdapterNode)((BetaNode)context.getLastBetaNode()).getTupleSource()).getObjectSource()==leftnode)) IObjectSourceNode osource = beta.getObjectSource(); osource.removeObjectConsumer(beta); context.setLastBetaNode(beta.getTupleSource());
IObjectSourceNode osource = beta.getObjectSource(); osource.removeObjectConsumer(beta); context.setLastBetaNode(beta.getTupleSource());
if(bnode.getObjectSource()==context.getLastAlphaNode() && Arrays.equals(evas, bnode.getConstraintEvaluators()) && Arrays.equals(ids, bnode.getConstraintIndexers()))
if(bnode.getObjectSource()==context.getLastAlphaNode() && Arrays.equals(evas, bnode.getConstraintEvaluators()) && Arrays.equals(ids, bnode.getConstraintIndexers()))