1 | protected E resolve(E object)↵ | | 1 | protected E resolve(E object)↵
|
2 | {↵ | | 2 | {↵
|
3 | return object;↵ | | 3 | return object;↵
|
4 | }↵ | | 4 | }↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * Removes each object of the collection from the list and returns whether any object was actually contained by the list;↵ | | 6 | * Removes each object of the collection from the list and returns whether any object was actually contained by the list;↵
|
7 | * it does no inverse updating, or notification.↵ | | 7 | * it does no inverse updating, or notification.↵
|
8 | * @param collection the collection of objects to be removed.↵ | | 8 | * @param collection the collection of objects to be removed.↵
|
9 | * @return whether any object was actually contained by the list.↵ | | 9 | * @return whether any object was actually contained by the list.↵
|
10 | */↵ | | 10 | */↵
|
11 | protected boolean doRemoveAll(Collection<?> collection)↵ | | 11 | protected boolean doRemoveAll(Collection<?> collection)↵
|
12 | {↵ | | 12 | {↵
|
13 | return super.removeAll(collection);↵ | | 13 | return super.removeAll(collection);↵
|
14 | }↵ | | 14 | }↵
|
|
15 | /**↵ | | 15 | /**↵
|
16 | * Removes the object from the list and returns the potentially updated notification chain;↵ | | 16 | * Removes the object from the list and returns the potentially updated notification chain;↵
|
17 | * it does no {@link #inverseRemove inverse} updating.↵ | | 17 | * it does no {@link #inverseRemove inverse} updating.↵
|
18 | * This implementation generates notifications as {@link #isNotificationRequired required}.↵ | | 18 | * This implementation generates notifications as {@link #isNotificationRequired required}.↵
|
19 | * @param object the object to be removed.↵ | | 19 | * @param object the object to be removed.↵
|
20 | * @return the notification chain.↵ | | 20 | * @return the notification chain.↵
|
21 | * @see #isNotificationRequired↵ | | 21 | * @see #isNotificationRequired↵
|
22 | * @see #hasInverse↵ | | 22 | * @see #hasInverse↵
|
23 | * @see #inverseRemove↵ | | 23 | * @see #inverseRemove↵
|
24 | */↵ | | 24 | */↵
|
25 | public NotificationChain basicRemove(Object object, NotificationChain notifications)↵ | | 25 | public NotificationChain basicRemove(Object object, NotificationChain notifications)↵
|
26 | {↵ | | 26 | {↵
|
27 | int index = indexOf(object);↵ | | 27 | int index = indexOf(object);↵
|
28 | if (index != -1)↵ | | 28 | if (index != -1)↵
|
29 | {↵ | | 29 | {↵
|
30 | if (isNotificationRequired())↵ | | 30 | if (isNotificationRequired())↵
|
31 | {↵ | | 31 | {↵
|
32 | boolean oldIsSet = isSet();↵ | | 32 | boolean oldIsSet = isSet();↵
|
33 | Object oldObject = doRemove(index);↵ | | 33 | Object oldObject = doRemove(index);↵
|
34 | NotificationImpl notification = createNotification(Notification.REMOVE, oldObject, null, index, oldIsSet);↵ | | 34 | NotificationImpl notification = createNotification(Notification.REMOVE, oldObject, null, index, oldIsSet);↵
|
35 | if (notifications == null) ↵ | | 35 | if (notifications == null) ↵
|
36 | {↵ | | 36 | {↵
|
37 | notifications = notification;↵ | | 37 | notifications = notification;↵
|
38 | }↵ | | 38 | }↵
|
39 | else↵ | | 39 | else↵
|
40 | {↵ | | 40 | {↵
|
41 | notifications.add(notification);↵ | | 41 | notifications.add(notification);↵
|
42 | }↵ | | 42 | }↵
|
43 | }↵ | | 43 | }↵
|
44 | else↵ | | 44 | else↵
|
45 | {↵ | | 45 | {↵
|
46 | doRemove(index);↵ | | 46 | doRemove(index);↵
|
47 | }↵ | | 47 | }↵
|
48 | }↵ | | 48 | }↵
|
49 | return notifications; | | 49 | return notifications;
|