/** {@inheritDoc} */ @Override public Iterator getElementsIterator(Object collection) { return ((EventList) collection).iterator(); }
/** {@inheritDoc} */ public Iterator getElementsIterator(Object collection) { return ((EventList) collection).iterator(); }
/** {@inheritDoc} */ public Iterator getElementsIterator(Object collection) { return ((EventList) collection).iterator(); }
/** * Removes the specified {@link EventList} as a source {@link EventList} * to this {@link CompositeList}. */ public void removeMemberList(EventList<E> list) { for(Iterator<EventList<E>> i = source.iterator(); i.hasNext(); ) { if(i.next() == list) { i.remove(); return; } } throw new IllegalArgumentException("Cannot remove list " + list + " which is not in this CompositeList"); } }
/** * Removes the specified {@link EventList} as a source {@link EventList} * to this {@link CompositeList}. */ public void removeMemberList(EventList<E> list) { for(Iterator<EventList<E>> i = source.iterator(); i.hasNext(); ) { if(i.next() == list) { i.remove(); return; } } throw new IllegalArgumentException("Cannot remove list " + list + " which is not in this CompositeList"); } }
/** * Removes the specified {@link EventList} as a source {@link EventList} * to this {@link CompositeList}. */ public void removeMemberList(EventList<E> list) { for(Iterator<EventList<E>> i = source.iterator(); i.hasNext(); ) { if(i.next() == list) { i.remove(); return; } } throw new IllegalArgumentException("Cannot remove list " + list + " which is not in this CompositeList"); } }
private void initTree() { // create groups for source elements and build tree int index = 0; for (Iterator<E> i = source.iterator(); i.hasNext(); index++) { processInsert(index, i.next(), false); } }
/** * Create a {@link CompositeMatcherEditor} that creates Matchers from the union * of the specified {@link EventList} of {@link MatcherEditor}s. The {@link EventList} * must not contain any <code>null</code> values and all elements must * implement {@link MatcherEditor}. */ public CompositeMatcherEditor(EventList<MatcherEditor<E>> matcherEditors) { this.matcherEditors = matcherEditors; // prepare the initial set for(Iterator<MatcherEditor<E>> i = matcherEditors.iterator(); i.hasNext(); ) { matcherEditorListeners.add(new DelegateMatcherEditorListener(i.next())); } // handle changes to the list of matchers matcherEditors.addListEventListener(new MatcherEditorsListListener()); // use the initial matcher fireChanged(rebuildMatcher()); }
/** * Create a {@link CompositeMatcherEditor} that creates Matchers from the union * of the specified {@link EventList} of {@link MatcherEditor}s. The {@link EventList} * must not contain any <code>null</code> values and all elements must * implement {@link MatcherEditor}. */ public CompositeMatcherEditor(EventList<MatcherEditor<E>> matcherEditors) { this.matcherEditors = matcherEditors; // prepare the initial set for(Iterator<MatcherEditor<E>> i = matcherEditors.iterator(); i.hasNext(); ) { matcherEditorListeners.add(new DelegateMatcherEditorListener(i.next())); } // handle changes to the list of matchers matcherEditors.addListEventListener(new MatcherEditorsListListener()); // use the initial matcher fireChanged(rebuildMatcher()); }
/** * Create a {@link CompositeMatcherEditor} that creates Matchers from the union * of the specified {@link EventList} of {@link MatcherEditor}s. The {@link EventList} * must not contain any <code>null</code> values and all elements must * implement {@link MatcherEditor}. */ public CompositeMatcherEditor(EventList<MatcherEditor<E>> matcherEditors) { this.matcherEditors = matcherEditors; // prepare the initial set for(Iterator<MatcherEditor<E>> i = matcherEditors.iterator(); i.hasNext(); ) { matcherEditorListeners.add(new DelegateMatcherEditorListener(i.next())); } // handle changes to the list of matchers matcherEditors.addListEventListener(new MatcherEditorsListListener()); // use the initial matcher fireChanged(rebuildMatcher()); }
/** * {@inheritDoc} */ @Override public Iterator<E> iterator() { source.getReadWriteLock().readLock().lock(); try { return source.iterator(); } finally { source.getReadWriteLock().readLock().unlock(); } }