protected boolean doAddAllUnique(int index, Collection<? extends E> objects) { boolean modified = false; ListIterator<E> listIterator = listIterator(index); for (Iterator<? extends E> o = objects.iterator(); o.hasNext();) { listIterator.add(validate(index, o.next())); modified = true; } return modified; }
protected boolean doAddAllUnique(int index, Collection<? extends E> objects) { boolean modified = false; ListIterator<E> listIterator = listIterator(index); for (Iterator<? extends E> o = objects.iterator(); o.hasNext();) { listIterator.add(validate(index, o.next())); modified = true; } return modified; }
@Override public void addUnique(int index, E object) { if (isNotificationRequired()) { boolean oldIsSet = isSet(); super.add(index, validate(index, object)); NotificationImpl notification = createNotification( Notification.ADD, null, object, index, oldIsSet); dispatchNotification(notification); } else { super.add(index, validate(index, object)); } }
@Override public void addUnique(int index, E object) { if (isNotificationRequired()) { boolean oldIsSet = isSet(); super.add(index, validate(index, object)); NotificationImpl notification = createNotification( Notification.ADD, null, object, index, oldIsSet); dispatchNotification(notification); } else { super.add(index, validate(index, object)); } }
@Override public E setUnique(int index, E object) { if (isNotificationRequired()) { boolean oldIsSet = isSet(); Notification notification = createNotification(Notification.SET, super.set(index, validate(index, object)), object, index, oldIsSet); dispatchNotification(notification); @SuppressWarnings("unchecked") E oldValue = (E) notification.getOldValue(); return oldValue; } else { return super.set(index, validate(index, object)); } }
@Override public E setUnique(int index, E object) { if (isNotificationRequired()) { boolean oldIsSet = isSet(); Notification notification = createNotification(Notification.SET, super.set(index, validate(index, object)), object, index, oldIsSet); dispatchNotification(notification); @SuppressWarnings("unchecked") E oldValue = (E) notification.getOldValue(); return oldValue; } else { return super.set(index, validate(index, object)); } }