1 | protected E resolve(int index, E object)↵ | | 1 | protected E resolve(int index, E object)↵
|
2 | {↵ | | 2 | {↵
|
3 | return object;↵ | | 3 | return object;↵
|
4 | }↵ | | 4 | }↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * Called to indicate that the data storage has been set.↵ | | 6 | * Called to indicate that the backing store list has been set.↵
|
7 | * This implementation does nothing; ↵ | | 7 | * This implementation does nothing; ↵
|
8 | * clients can use this to monitor settings to the data storage.↵ | | 8 | * clients can use this to monitor settings to the backing store list.↵
|
9 | * @param index the position that was set.↵ | | 9 | * @param index the position that was set.↵
|
10 | * @param newObject the new object at the position.↵ | | 10 | * @param newObject the new object at the position.↵
|
11 | * @param oldObject the old object at the position.↵ | | 11 | * @param oldObject the old object at the position.↵
|
12 | */↵ | | 12 | */↵
|
13 | protected void didSet(int index, E newObject, E oldObject)↵ | | 13 | protected void didSet(int index, E newObject, E oldObject)↵
|
14 | {↵ | | 14 | {↵
|
15 | // Do nothing.↵ | | 15 | // Do nothing.↵
|
16 | }↵ | | 16 | }↵
|
|
17 | /**↵ | | 17 | /**↵
|
18 | * Called to indicate that an object has been added to the data storage.↵ | | 18 | * Called to indicate that an object has been added to the backing store list.↵
|
19 | * This implementation does nothing; ↵ | | 19 | * This implementation does nothing; ↵
|
20 | * clients can use this to monitor additions to the data storage.↵ | | 20 | * clients can use this to monitor additions to the backing store list.↵
|
21 | * @param index the position object the new object.↵ | | 21 | * @param index the position object the new object.↵
|
22 | * @param newObject the new object at the position.↵ | | 22 | * @param newObject the new object at the position.↵
|
23 | */↵ | | 23 | */↵
|
24 | protected void didAdd(int index, E newObject)↵ | | 24 | protected void didAdd(int index, E newObject)↵
|
25 | {↵ | | 25 | {↵
|
26 | // Do nothing.↵ | | 26 | // Do nothing.↵
|
27 | }↵ | | 27 | }↵
|
|
28 | /**↵ | | 28 | /**↵
|
29 | * Called to indicate that an object has been removed from the data storage.↵ | | 29 | * Called to indicate that an object has been removed from the backing store list.↵
|
30 | * This implementation does nothing; ↵ | | 30 | * This implementation does nothing; ↵
|
31 | * clients can use this to monitor removals from the data storage.↵ | | 31 | * clients can use this to monitor removals from the backing store list.↵
|
32 | * @param index the position of the old object.↵ | | 32 | * @param index the position of the old object.↵
|
33 | * @param oldObject the old object at the position.↵ | | 33 | * @param oldObject the old object at the position.↵
|
34 | */↵ | | 34 | */↵
|
35 | protected void didRemove(int index, E oldObject)↵ | | 35 | protected void didRemove(int index, E oldObject)↵
|
36 | {↵ | | 36 | {↵
|
37 | // Do nothing.↵ | | 37 | // Do nothing.↵
|
38 | }↵ | | 38 | }↵
|
|
39 | /**↵ | | 39 | /**↵
|
40 | * Called to indicate that the data storage has been cleared.↵ | | 40 | * Called to indicate that the backing store list has been cleared.↵
|
41 | * This implementation calls {@link #didRemove didRemove} for each object;↵ | | 41 | * This implementation calls {@link #didRemove didRemove} for each object;↵
|
42 | * clients can use this to monitor clearing of the data storage.↵ | | 42 | * clients can use this to monitor clearing of the backing store list.↵
|
43 | * @param size the original size of the list.↵ | | 43 | * @param size the original size of the list.↵
|
44 | * @param oldObjects the old data storage being discarded.↵ | | 44 | * @param oldObjects the old backing store list being discarded.↵
|
45 | * @see #didRemove↵ | | 45 | * @see #didRemove↵
|
46 | */↵ | | 46 | */↵
|
47 | protected void didClear(int size, Object [] oldObjects)↵ | | 47 | protected void didClear(int size, Object [] oldObjects)↵
|
48 | {↵ | | 48 | {↵
|
49 | if (oldObjects != null)↵ | | 49 | if (oldObjects != null)↵
|
50 | {↵ | | 50 | {↵
|
51 | for (int i = 0; i < size; ++i)↵ | | 51 | for (int i = 0; i < size; ++i)↵
|
52 | {↵ | | 52 | {↵
|
53 | @SuppressWarnings("unchecked") E object = (E)oldObjects[i];↵ | | 53 | @SuppressWarnings("unchecked") E object = (E)oldObjects[i];↵
|
54 | didRemove(i, object);↵ | | 54 | didRemove(i, object);↵
|
55 | }↵ | | 55 | }↵
|
56 | }↵ | | 56 | }↵
|
57 | }↵ | | 57 | }↵
|
|
58 | /**↵ | | 58 | /**↵
|
59 | * Called to indicate that an object has been moved in the data storage.↵ | | 59 | * Called to indicate that an object has been moved in the backing store list.↵
|
60 | * This implementation does nothing; ↵ | | 60 | * This implementation does nothing; ↵
|
61 | * clients can use this to monitor movement in the data storage.↵ | | 61 | * clients can use this to monitor movement in the backing store list.↵
|
62 | * @param index the position of the moved object.↵ | | 62 | * @param index the position of the moved object.↵
|
63 | * @param movedObject the moved object at the position.↵ | | 63 | * @param movedObject the moved object at the position.↵
|
64 | * @param oldIndex the position the object was at before the move.↵ | | 64 | * @param oldIndex the position the object was at before the move.↵
|
65 | */↵ | | 65 | */↵
|
66 | protected void didMove(int index, E movedObject, int oldIndex)↵ | | 66 | protected void didMove(int index, E movedObject, int oldIndex)↵
|
67 | {↵ | | 67 | {↵
|
68 | // Do nothing.↵ | | 68 | // Do nothing.↵
|
69 | }↵ | | 69 | }↵
|
|
70 | /**↵ | | 70 | /**↵
|
71 | * Called to indicate that the data storage has been changed.↵ | | 71 | * Called to indicate that the backing store list has been changed.↵
|
72 | * This implementation does nothing; ↵ | | 72 | * This implementation does nothing; ↵
|
73 | * clients can use this to monitor change in the data storage.↵ | | 73 | * clients can use this to monitor change in the backing store list.↵
|
74 | */↵ | | 74 | */↵
|
75 | protected void didChange()↵ | | 75 | protected void didChange()↵
|
76 | { | | 76 | {
|