1 16 package org.apache.commons.collections.iterators; 17 18 import java.util.Iterator ; 19 20 29 public class ProxyIterator implements Iterator { 30 31 32 private Iterator iterator; 33 34 37 41 public ProxyIterator() { 42 super(); 43 } 44 45 51 public ProxyIterator(Iterator iterator) { 52 super(); 53 this.iterator = iterator; 54 } 55 56 59 64 public boolean hasNext() { 65 return getIterator().hasNext(); 66 } 67 68 75 public Object next() { 76 return getIterator().next(); 77 } 78 79 83 public void remove() { 84 getIterator().remove(); 85 } 86 87 92 public Iterator getIterator() { 93 return iterator; 94 } 95 98 public void setIterator(Iterator iterator) { 99 this.iterator = iterator; 100 } 101 } 102 | Popular Tags |