1
22
23 package com.liferay.portal.kernel.util;
24
25 import java.util.Collection;
26 import java.util.Iterator;
27 import java.util.List;
28 import java.util.ListIterator;
29
30
36 public class ListWrapper<E> implements List<E> {
37
38 public ListWrapper(List<E> list) {
39 _list = list;
40 }
41
42 public boolean add(E o) {
43 return _list.add(o);
44 }
45
46 public void add(int index, E element) {
47 _list.add(index, element);
48 }
49
50 public boolean addAll(Collection<? extends E> c) {
51 return _list.addAll(c);
52 }
53
54 public boolean addAll(int index, Collection<? extends E> c) {
55 return _list.addAll(index, c);
56 }
57
58 public void clear() {
59 _list.clear();
60 }
61
62 public boolean contains(Object o) {
63 return _list.contains(o);
64 }
65
66 public boolean containsAll(Collection<?> c) {
67 return _list.containsAll(c);
68 }
69
70 public E get(int index) {
71 return _list.get(index);
72 }
73
74 public int indexOf(Object o) {
75 return _list.indexOf(o);
76 }
77
78 public boolean isEmpty() {
79 return _list.isEmpty();
80 }
81
82 public Iterator<E> iterator() {
83 return _list.iterator();
84 }
85
86 public int lastIndexOf(Object o) {
87 return _list.lastIndexOf(o);
88 }
89
90 public ListIterator<E> listIterator() {
91 return _list.listIterator();
92 }
93
94 public ListIterator<E> listIterator(int index) {
95 return _list.listIterator(index);
96 }
97
98 public boolean remove(Object o) {
99 return _list.remove(o);
100 }
101
102 public E remove(int index) {
103 return _list.remove(index);
104 }
105
106 public boolean removeAll(Collection<?> c) {
107 return _list.removeAll(c);
108 }
109
110 public boolean retainAll(Collection<?> c) {
111 return _list.retainAll(c);
112 }
113
114 public E set(int index, E element) {
115 return _list.set(index, element);
116 }
117
118 public int size() {
119 return _list.size();
120 }
121
122 public List<E> subList(int fromIndex, int toIndex) {
123 return _list.subList(fromIndex, toIndex);
124 }
125
126 public Object[] toArray() {
127 return _list.toArray();
128 }
129
130 public <T> T[] toArray(T[] a) {
131 return _list.toArray(a);
132 }
133
134 private List<E> _list;
135
136 }