@Override public boolean addAll(int index, Collection<? extends E> c) { boolean r = super.addAll(index, c); riseListChanged(); return r; }
/** * The default constructor. * * @param functor * the function symbol name. It is defined the same as a * predicate. * @param terms * the list of arguments. */ protected FunctionalTermImpl(Predicate functor, Term... terms) { this.functor = functor; EventGeneratingList<Term> eventlist = new EventGeneratingLinkedList<Term>(); Collections.addAll(eventlist, terms); this.terms = eventlist; registerListeners(eventlist); }
protected FunctionalTermImpl(Predicate functor, List<Term> terms) { this.functor = functor; EventGeneratingList<Term> eventlist = new EventGeneratingLinkedList<Term>(); eventlist.addAll(terms); this.terms = eventlist; registerListeners(eventlist); }
@Override public boolean remove(Object o) { boolean r = super.remove(o); riseListChanged(); return r; }
protected CQIEImpl(Function head, 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>(); Collections.addAll(eventbody, 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; EventGeneratingList<Term> headterms = (EventGeneratingList<Term>) head.getTerms(); headterms.addListener(this); } }
@Override public boolean add(E o) { boolean r = super.add(o); riseListChanged(); return r; }
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; EventGeneratingList<Term> headterms = (EventGeneratingList<Term>) head.getTerms(); headterms.addListener(this); } }
@Override public void add(int index, E element) { super.add(index, element); riseListChanged(); }
@Override public void clear() { super.clear(); riseListChanged(); }
@Override public boolean addAll(Collection<? extends E> c) { boolean r = super.addAll(c); riseListChanged(); return r; }
@Override public boolean removeAll(Collection<?> c) { boolean r = super.removeAll(c); riseListChanged(); return r; }
@Override public E set(int index, E element) { E oldobject = super.set(index, element); riseListChanged(); return oldobject; }
@Override public boolean retainAll(Collection<?> c) { boolean r = super.retainAll(c); riseListChanged(); return r; }