@Test public void testItemAddedEvent_someItemsAreFiltered_addedItemIsTheFirstVisibleItem() { BeanItemContainer<Person> container = new BeanItemContainer<Person>( Person.class); Person bean = new Person("John"); ItemSetChangeListener addListener = createListenerMockFor(container); Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); EasyMock.replay(addListener); List<Person> beans = Arrays.asList(new Person("Jack"), bean); container.addFilter(new Compare.Equal("name", "John")); container.addAll(beans); assertEquals(bean, capturedEvent.getValue().getFirstItemId()); }
@Override public void addAll(Collection<? extends BEANTYPE> collection) { super.addAll(collection); }
BeanItemContainer extends
        AbstractBeanContainer<BEANTYPE, BEANTYPE> { @Override public void addAll(Collection<? extends BEANTYPE> collection) { super.addAll(collection); } }
BeanItemContainer extends
        AbstractBeanContainer<BEANTYPE, BEANTYPE> { @Override public void addAll(Collection<? extends BEANTYPE> collection) { super.addAll(collection); } BeanItemContainer(Class<? super BEANTYPE> type); @SuppressWarnings("unchecked") @Deprecated  BeanItemContainer(Collection<? extends BEANTYPE> collection);  BeanItemContainer(Class<? super BEANTYPE> type,
            Collection<? extends BEANTYPE> collection); }
BeanItemContainer extends
        AbstractBeanContainer<BEANTYPE, BEANTYPE> { @Override public void addAll(Collection<? extends BEANTYPE> collection) { super.addAll(collection); } BeanItemContainer(Class<? super BEANTYPE> type); @SuppressWarnings("unchecked") @Deprecated  BeanItemContainer(Collection<? extends BEANTYPE> collection);  BeanItemContainer(Class<? super BEANTYPE> type,
            Collection<? extends BEANTYPE> collection); @Override void addAll(Collection<? extends BEANTYPE> collection); @Override @SuppressWarnings("unchecked") BeanItem<BEANTYPE> addItemAfter(Object previousItemId,
            Object newItemId); @Override @SuppressWarnings("unchecked") BeanItem<BEANTYPE> addItemAt(int index, Object newItemId); @Override @SuppressWarnings("unchecked") BeanItem<BEANTYPE> addItem(Object itemId); @Override BeanItem<BEANTYPE> addBean(BEANTYPE bean); }
BeanItemContainer extends
        AbstractBeanContainer<BEANTYPE, BEANTYPE> { @Override public void addAll(Collection<? extends BEANTYPE> collection) { super.addAll(collection); } BeanItemContainer(Class<? super BEANTYPE> type); @SuppressWarnings("unchecked") @Deprecated  BeanItemContainer(Collection<? extends BEANTYPE> collection);  BeanItemContainer(Class<? super BEANTYPE> type,
            Collection<? extends BEANTYPE> collection); @Override void addAll(Collection<? extends BEANTYPE> collection); @Override @SuppressWarnings("unchecked") BeanItem<BEANTYPE> addItemAfter(Object previousItemId,
            Object newItemId); @Override @SuppressWarnings("unchecked") BeanItem<BEANTYPE> addItemAt(int index, Object newItemId); @Override @SuppressWarnings("unchecked") BeanItem<BEANTYPE> addItem(Object itemId); @Override BeanItem<BEANTYPE> addBean(BEANTYPE bean);  }