예제 #1
0
 public E set(int i, E e) {
   E old = store.get(i);
   E ret = store.set(i, e);
   if (old != e) {
     for (CollectionObserver<E> o : observers) {
       o.removed(host, old);
       o.added(host, e);
     }
   }
   return ret;
 }
예제 #2
0
 public void add(int i, E e) {
   store.add(i, e);
   for (CollectionObserver<E> o : observers) {
     o.added(host, e);
   }
 }