private void verifyListChange() { this.event = null; this.eventType = null; this.listHolder.addItem(4, "E"); this.verifyEvent(ADD, 7, "E"); this.event = null; this.eventType = null; this.listHolder.addItem(5, null); this.verifyEvent(ADD, 8, null); this.event = null; this.eventType = null; this.listHolder.removeItem(5); this.verifyEvent(REMOVE, 8, null); this.event = null; this.eventType = null; this.listHolder.removeItem(4); this.verifyEvent(REMOVE, 7, "E"); this.event = null; this.eventType = null; this.listHolder.addItems(0, this.buildList()); this.verifyEvent(ADD); assertEquals(this.buildList(), CollectionTools.list(this.event.items())); this.event = null; this.eventType = null; this.listHolder.replaceItem(0, "AA"); this.verifyEvent(REPLACE); assertFalse(CollectionTools.contains(this.event.items(), "A")); assertTrue(CollectionTools.contains(this.event.items(), "AA")); }
private boolean listContainsAny(Collection items) { List extendedList = CollectionTools.list((ListIterator) this.listHolder.getValue()); for (Iterator stream = items.iterator(); stream.hasNext(); ) { if (extendedList.contains(stream.next())) { return true; } } return false; }
public void testGetValue() { this.extendedListHolder.addListChangeListener(ValueModel.VALUE, this.buildListener()); assertEquals( this.buildExtendedList(), CollectionTools.list((Iterator) this.extendedListHolder.getValue())); }
protected List getLoggingTypeSelections() { if (loggingTypeSelections == null) { loggingTypeSelections = CollectionTools.list(buildLoggingTypes()); } return loggingTypeSelections; }
public static DescriptorStringHolder[] buildHolders(Iterator descriptors) { return buildHolders(CollectionTools.list(descriptors)); }
public void addClasspathEntries(ListIterator entries) { this.addClasspathEntries(CollectionTools.list(entries)); }