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