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