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