1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.lookup;
17
18 import java.io.Serializable;
19 import java.util.ArrayList;
20 import java.util.Collection;
21 import java.util.Iterator;
22 import java.util.List;
23 import java.util.ListIterator;
24 import java.util.RandomAccess;
25
26
27
28
29
30
31
32 public class CollectionIncomplete<T> implements List<T>, RandomAccess, Serializable {
33 private static final long serialVersionUID = 8683452581122892189L;
34
35 private final List<T> list;
36 private Long actualSizeIfTruncated;
37
38
39
40
41
42
43
44
45 public CollectionIncomplete(Collection<T> collection, Long actualSizeIfTruncated) {
46 super();
47
48 this.list = new ArrayList<T>(collection);
49 this.actualSizeIfTruncated = actualSizeIfTruncated;
50 }
51
52
53
54
55 public void add(int arg0, T arg1) {
56 list.add(arg0, arg1);
57 }
58
59
60
61
62 public boolean add(T arg0) {
63 return list.add(arg0);
64 }
65
66
67
68
69 public boolean addAll(int arg0, Collection<? extends T> arg1) {
70 return list.addAll(arg0, arg1);
71 }
72
73
74
75
76 public boolean addAll(Collection<? extends T> arg0) {
77 return list.addAll(arg0);
78 }
79
80
81
82
83 public void clear() {
84 list.clear();
85 }
86
87
88
89
90 public boolean contains(Object arg0) {
91 return list.contains(arg0);
92 }
93
94
95
96
97 public boolean containsAll(Collection<?> arg0) {
98 return list.containsAll(arg0);
99 }
100
101
102
103
104 public boolean equals(Object arg0) {
105 return list.equals(arg0);
106 }
107
108
109
110
111 public T get(int arg0) {
112 return list.get(arg0);
113 }
114
115
116
117
118 public int hashCode() {
119 return list.hashCode();
120 }
121
122
123
124
125 public int indexOf(Object arg0) {
126 return list.indexOf(arg0);
127 }
128
129
130
131
132 public boolean isEmpty() {
133 return list.isEmpty();
134 }
135
136
137
138
139 public Iterator<T> iterator() {
140 return list.iterator();
141 }
142
143
144
145
146 public int lastIndexOf(Object arg0) {
147 return list.lastIndexOf(arg0);
148 }
149
150
151
152
153 public ListIterator<T> listIterator() {
154 return list.listIterator();
155 }
156
157
158
159
160 public ListIterator listIterator(int arg0) {
161 return list.listIterator(arg0);
162 }
163
164
165
166
167 public T remove(int arg0) {
168 return list.remove(arg0);
169 }
170
171
172
173
174 public boolean remove(Object arg0) {
175 return list.remove(arg0);
176 }
177
178
179
180
181 public boolean removeAll(Collection<?> arg0) {
182 return list.removeAll(arg0);
183 }
184
185
186
187
188 public boolean retainAll(Collection<?> arg0) {
189 return list.retainAll(arg0);
190 }
191
192
193
194
195 public T set(int arg0, T arg1) {
196 return list.set(arg0, arg1);
197 }
198
199
200
201
202 public int size() {
203 return list.size();
204 }
205
206
207
208
209 public List<T> subList(int arg0, int arg1) {
210 return list.subList(arg0, arg1);
211 }
212
213
214
215
216 public Object[] toArray() {
217 return list.toArray();
218 }
219
220
221
222
223 public <T> T[] toArray(T[] arg0) {
224 return list.toArray(arg0);
225 }
226
227
228
229
230 public String toString() {
231 return list.toString();
232 }
233
234
235
236
237
238
239
240
241
242
243 public Long getActualSizeIfTruncated() {
244 return actualSizeIfTruncated;
245 }
246
247
248
249
250
251
252 public void setActualSizeIfTruncated(Long actualSizeIfTruncated) {
253 this.actualSizeIfTruncated = actualSizeIfTruncated;
254 }
255 }