3 import java.util.Iterator;
4 import java.util.NoSuchElementException;
7 public class FilteredIterator<E>
13 boolean hasNext_ = true;
15 public FilteredIterator(Iterator<E> base, Filter<E> filter)
30 throw new NoSuchElementException();
33 public boolean hasNext()
40 throw new UnsupportedOperationException();
45 while (base_.hasNext()) {
47 if (filter_.match(next_))