001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.core.lookup;
017:
018: import java.util.ArrayList;
019: import java.util.Collection;
020: import java.util.Iterator;
021: import java.util.List;
022: import java.util.ListIterator;
023:
024: public class CollectionIncomplete implements List {
025: private List list;
026: private Long actualSizeIfTruncated;
027:
028: /**
029: * @param collection
030: * @param actualSizeIfTruncated
031: */
032: public CollectionIncomplete(Collection collection,
033: Long actualSizeIfTruncated) {
034: super ();
035: this .list = new ArrayList(collection);
036: this .actualSizeIfTruncated = actualSizeIfTruncated;
037: }
038:
039: /**
040: * @param arg0
041: * @param arg1
042: */
043: public void add(int arg0, Object arg1) {
044: list.add(arg0, arg1);
045: }
046:
047: /**
048: * @param arg0
049: * @return
050: */
051: public boolean add(Object arg0) {
052: return list.add(arg0);
053: }
054:
055: /**
056: * @param arg0
057: * @param arg1
058: * @return
059: */
060: public boolean addAll(int arg0, Collection arg1) {
061: return list.addAll(arg0, arg1);
062: }
063:
064: /**
065: * @param arg0
066: * @return
067: */
068: public boolean addAll(Collection arg0) {
069: return list.addAll(arg0);
070: }
071:
072: /**
073: *
074: */
075: public void clear() {
076: list.clear();
077: }
078:
079: /**
080: * @param arg0
081: * @return
082: */
083: public boolean contains(Object arg0) {
084: return list.contains(arg0);
085: }
086:
087: /**
088: * @param arg0
089: * @return
090: */
091: public boolean containsAll(Collection arg0) {
092: return list.containsAll(arg0);
093: }
094:
095: /*
096: * (non-Javadoc)
097: *
098: * @see java.lang.Object#equals(java.lang.Object)
099: */
100: public boolean equals(Object arg0) {
101: return list.equals(arg0);
102: }
103:
104: /**
105: * @param arg0
106: * @return
107: */
108: public Object get(int arg0) {
109: return list.get(arg0);
110: }
111:
112: /*
113: * (non-Javadoc)
114: *
115: * @see java.lang.Object#hashCode()
116: */
117: public int hashCode() {
118: return list.hashCode();
119: }
120:
121: /**
122: * @param arg0
123: * @return
124: */
125: public int indexOf(Object arg0) {
126: return list.indexOf(arg0);
127: }
128:
129: /**
130: * @return
131: */
132: public boolean isEmpty() {
133: return list.isEmpty();
134: }
135:
136: /**
137: * @return
138: */
139: public Iterator iterator() {
140: return list.iterator();
141: }
142:
143: /**
144: * @param arg0
145: * @return
146: */
147: public int lastIndexOf(Object arg0) {
148: return list.lastIndexOf(arg0);
149: }
150:
151: /**
152: * @return
153: */
154: public ListIterator listIterator() {
155: return list.listIterator();
156: }
157:
158: /**
159: * @param arg0
160: * @return
161: */
162: public ListIterator listIterator(int arg0) {
163: return list.listIterator(arg0);
164: }
165:
166: /**
167: * @param arg0
168: * @return
169: */
170: public Object remove(int arg0) {
171: return list.remove(arg0);
172: }
173:
174: /**
175: * @param arg0
176: * @return
177: */
178: public boolean remove(Object arg0) {
179: return list.remove(arg0);
180: }
181:
182: /**
183: * @param arg0
184: * @return
185: */
186: public boolean removeAll(Collection arg0) {
187: return list.removeAll(arg0);
188: }
189:
190: /**
191: * @param arg0
192: * @return
193: */
194: public boolean retainAll(Collection arg0) {
195: return list.retainAll(arg0);
196: }
197:
198: /**
199: * @param arg0
200: * @param arg1
201: * @return
202: */
203: public Object set(int arg0, Object arg1) {
204: return list.set(arg0, arg1);
205: }
206:
207: /**
208: * @return
209: */
210: public int size() {
211: return list.size();
212: }
213:
214: /**
215: * @param arg0
216: * @param arg1
217: * @return
218: */
219: public List subList(int arg0, int arg1) {
220: return list.subList(arg0, arg1);
221: }
222:
223: /**
224: * @return
225: */
226: public Object[] toArray() {
227: return list.toArray();
228: }
229:
230: /**
231: * @param arg0
232: * @return
233: */
234: public Object[] toArray(Object[] arg0) {
235: return list.toArray(arg0);
236: }
237:
238: /*
239: * (non-Javadoc)
240: *
241: * @see java.lang.Object#toString()
242: */
243: public String toString() {
244: return list.toString();
245: }
246:
247: /**
248: * @return Returns the actualSizeIfTruncated.
249: */
250: public Long getActualSizeIfTruncated() {
251: return actualSizeIfTruncated;
252: }
253:
254: /**
255: * @param actualSize The actualSizeIfTruncated to set.
256: */
257: public void setActualSizeIfTruncated(Long actualSizeIfTruncated) {
258: this.actualSizeIfTruncated = actualSizeIfTruncated;
259: }
260: }
|