/** * Call this method to tell this condition-checker whether or not to notify its parent of any * changes occurred to its conflict set. */ public void setNotifyParent(boolean value) { this.notifyParent = value; for (ConditionChecker cc : this.getSubConditionCheckers()) { if (cc.getCondition().isPositive()) { cc.setNotifyParent(value); } } }
private void addSubConditionChecker(ConditionChecker cc) { if (!this.subConditionCheckers.contains(cc)) { this.subConditionCheckers.add(cc); if (cc instanceof CompositeConditionChecker) { this.hasNacSubconditions = true; } if (this.condition.getCountNode() != null) { cc.setNotifyParent(true); } } }
@Override public boolean demandUpdate() { boolean result = false; if (!this.isUpToDate()) { if (this.getOwner().isInOnDemandMode()) { if (!this.isEmpty()) { for (ReteNetworkNode nnode : this.getAntecedents()) { result = result || nnode.demandUpdate(); } } if (this.hasNacs()) { for (ConditionChecker cc : this.getSubConditionCheckers()) { if (cc instanceof CompositeConditionChecker) { cc.demandUpdate(); } } } } setUpToDate(true); } return result; }