1 16 package org.apache.commons.collections.iterators; 17 18 import java.util.ListIterator ; 19 20 30 public class ProxyListIterator implements ListIterator { 31 32 33 private ListIterator iterator; 34 35 38 43 public ProxyListIterator() { 44 super(); 45 } 46 47 53 public ProxyListIterator(ListIterator iterator) { 54 super(); 55 this.iterator = iterator; 56 } 57 58 61 66 public void add(Object o) { 67 getListIterator().add(o); 68 } 69 70 75 public boolean hasNext() { 76 return getListIterator().hasNext(); 77 } 78 79 84 public boolean hasPrevious() { 85 return getListIterator().hasPrevious(); 86 } 87 88 93 public Object next() { 94 return getListIterator().next(); 95 } 96 97 102 public int nextIndex() { 103 return getListIterator().nextIndex(); 104 } 105 106 111 public Object previous() { 112 return getListIterator().previous(); 113 } 114 115 120 public int previousIndex() { 121 return getListIterator().previousIndex(); 122 } 123 124 129 public void remove() { 130 getListIterator().remove(); 131 } 132 133 138 public void set(Object o) { 139 getListIterator().set(o); 140 } 141 142 145 149 public ListIterator getListIterator() { 150 return iterator; 151 } 152 153 157 public void setListIterator(ListIterator iterator) { 158 this.iterator = iterator; 159 } 160 161 } 162 163 | Popular Tags |