protected void internalIncludeItem(T item, Runnable addToData) { backgroundWorker.checkUIAccess(); checkStateBeforeAdd(); addToData.run(); attachListener(item); fireCollectionChanged(Operation.ADD, Collections.singletonList(item)); }
protected void internalAddItem(T item, Runnable addToData) { checkNotNullArgument(item, "item is null"); backgroundWorker.checkUIAccess(); checkStateBeforeAdd(); addToData.run(); attachListener(item); modified(item); fireCollectionChanged(Operation.ADD, Collections.singletonList(item)); }