public void Remove() { il.Dispose(); entry.Remove(last); if (last.HasAnnot(TPercept)) { percepts.Remove(last); } size--; }
private bool RemoveFromEntry(Literal l) { if (l.HasSource()) { return(false); } else { Dictionary <PredicateIndicator, BelEntry> aux; nameSpaces.TryGetValue(l.GetNS(), out aux); Dictionary <PredicateIndicator, BelEntry> belsMap = l.GetNS() == Literal.DefaultNS ? belsMapDefaultNS : aux; PredicateIndicator key = l.GetPredicateIndicator(); BelEntry entry = belsMap[key]; entry.Remove(l); if (entry.IsEmpty()) { belsMap.Remove(key); } size--; return(true); } }