public void removeAllBlockersAndBlocked(InternalAgenda agenda) {
if (this.blockers != null) {
// Iterate and remove this node's logical dependency list from each of it's blockers
for (LinkedListEntry<LogicalDependency> node = blockers.getFirst(); node != null; node = node.getNext()) {
LogicalDependency dep = node.getObject();
dep.getJustifier().getBlocked().remove(dep);
}
}
this.blockers = null;
if (this.blocked != null) {
// Iterate and remove this node's logical dependency list from each of it's blocked
for (LogicalDependency dep = blocked.getFirst(); dep != null; ) {
LogicalDependency tmp = dep.getNext();
removeBlocked(dep);
RuleTerminalNodeLeftTuple justified = (RuleTerminalNodeLeftTuple) dep.getJustified();
if (justified.getBlockers().isEmpty() && justified.isActive()) {
agenda.stageLeftTuple(ruleAgendaItem, justified);