01: package net.sourceforge.orbroker;
02:
03: import java.util.ArrayList;
04: import java.util.Collection;
05: import java.util.List;
06: import java.util.ListIterator;
07:
08: /*
09: * Created on Apr 20, 2004
10: *
11: */
12:
13: /**
14: * @author Nils Kilden-Pedersen
15: */
16: final class LazyList extends LazyCollection implements List {
17:
18: LazyList(Broker broker, String statementID,
19: ConnectionContext context) {
20: super (broker, statementID, context, new ArrayList());
21: }
22:
23: /**
24: * @see java.util.List#add(int, java.lang.Object)
25: */
26: public void add(int index, Object object) {
27: getList().add(index, object);
28: }
29:
30: /**
31: * @see java.util.List#addAll(int, java.util.Collection)
32: */
33: public boolean addAll(int index, Collection collection) {
34: return getList().addAll(index, collection);
35: }
36:
37: /**
38: * @see java.util.List#get(int)
39: */
40: public Object get(int index) {
41: return getList().get(index);
42: }
43:
44: /**
45: * @see java.util.List#indexOf(java.lang.Object)
46: */
47: public int indexOf(Object object) {
48: return getList().indexOf(object);
49: }
50:
51: /**
52: * @see java.util.List#lastIndexOf(java.lang.Object)
53: */
54: public int lastIndexOf(Object object) {
55: return getList().lastIndexOf(object);
56: }
57:
58: /**
59: * @see java.util.List#listIterator()
60: */
61: public ListIterator listIterator() {
62: return getList().listIterator();
63: }
64:
65: /**
66: * @see java.util.List#listIterator(int)
67: */
68: public ListIterator listIterator(int index) {
69: return getList().listIterator(index);
70: }
71:
72: /**
73: * @see java.util.List#remove(int)
74: */
75: public Object remove(int index) {
76: return getList().remove(index);
77: }
78:
79: /**
80: * @see java.util.List#set(int, java.lang.Object)
81: */
82: public Object set(int index, Object object) {
83: return getList().set(index, object);
84: }
85:
86: /**
87: * @see java.util.List#subList(int, int)
88: */
89: public List subList(int fromIndex, int toIndex) {
90: return getList().subList(fromIndex, toIndex);
91: }
92:
93: private List getList() {
94: return (List) getCollection();
95: }
96:
97: }
|