45 private List<IE> fromList;
53 this.fromList = fromList;
56 public List<IE> getInnerList() {
76 public void add(
int index, OE element) {
87 public OE
get(
int index) {
91 public Iterator<OE> iterator() {
92 return new MyIterator(fromList.iterator());
95 public ListIterator<OE> listIterator() {
96 return new MyListIterator(fromList.listIterator());
99 public ListIterator<OE> listIterator(
int index) {
100 return new MyListIterator(fromList.listIterator(index));
104 public OE
remove(
int index) {
109 public OE
set(
int index, OE element) {
111 from = fromList.set(index, from);
117 return fromList.size();
120 private class MyIterator
implements Iterator<OE> {
121 private Iterator<IE> itr;
123 public MyIterator(Iterator<IE> itr) {
127 public boolean hasNext() {
128 return itr.hasNext();
135 public void remove() {
140 private class MyListIterator
implements ListIterator<OE> {
141 private ListIterator<IE> itr;
143 public MyListIterator(ListIterator<IE> itr) {
147 public void add(OE o) {
152 public boolean hasNext() {
153 return itr.hasNext();
156 public boolean hasPrevious() {
157 return itr.hasPrevious();
164 public int nextIndex() {
165 return itr.nextIndex();
168 public OE previous() {
172 public int previousIndex() {
173 return itr.previousIndex();
176 public void remove() {
180 public void set(OE o) {