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