public void updateBody(List<Function> body) { this.body.clear(); this.body.addAll(body); // TODO: what about listeners? listChanged(); }
protected FunctionalTermImpl(Predicate functor, List<Term> terms) { super(functor); EventGeneratingList<Term> eventlist = new EventGeneratingLinkedList<Term>(); eventlist.addAll(terms); this.terms = eventlist; registerListeners(eventlist); }
protected FunctionalTermImpl(Predicate functor, List<Term> terms) { super(functor); EventGeneratingList<Term> eventlist = new EventGeneratingLinkedList<Term>(); eventlist.addAll(terms); this.terms = eventlist; registerListeners(eventlist); }
protected CQIEImpl(Function head, List<Function> body) { // The syntax for CQ may contain no body, thus, this condition will // check whether the construction of the link list is possible or not. if (body != null) { EventGeneratingList<Function> eventbody = new EventGeneratingLinkedList<Function>(); eventbody.addAll(body); this.body = eventbody; registerListeners(eventbody); // TODO possible memory leak!!! we should also de-register when objects are removed } // The syntax for CQ may also contain no head, thus, this condition // will check whether we can look for the head terms or not. if (head != null) { this.head = head; subscribeHeadTerms(head); } }
terms.addAll(newterms);
terms.addAll(newterms);