Пример #1
0
 @Override
 public void transferListenersTo(
     IModelChangeProviderExtension target, IModelChangedListenerFilter filter) {
   ArrayList<IModelChangedListener> removed = new ArrayList<>();
   for (int i = 0; i < fListeners.size(); i++) {
     IModelChangedListener listener = fListeners.get(i);
     if (filter == null || filter.accept(listener)) {
       target.addModelChangedListener(listener);
       removed.add(listener);
     }
   }
   fListeners.removeAll(removed);
 }