@Override public T next() throws NoSuchElementException { if (done) { throw new java.util.NoSuchElementException(); } T o = next; advance(); return o; }
@Override public T next() throws NoSuchElementException { if (done) { throw new java.util.NoSuchElementException(); } T o = next; advance(); return o; }
@Override public T next() throws NoSuchElementException { if (done) { throw new java.util.NoSuchElementException(); } T o = next; advance(); return o; }
/** * @param i the original iterator * @param f a filter which defines which elements belong to the generated iterator */ public FilterIterator(Iterator<? extends T> i, Predicate<? super T> f) { if (i == null) { throw new IllegalArgumentException("null i"); } if (f == null) { throw new IllegalArgumentException("null f"); } this.i = i; this.f = f; advance(); }
/** * @param i the original iterator * @param f a filter which defines which elements belong to the generated iterator */ public FilterIterator(Iterator<? extends T> i, Predicate<? super T> f) { if (i == null) { throw new IllegalArgumentException("null i"); } if (f == null) { throw new IllegalArgumentException("null f"); } this.i = i; this.f = f; advance(); }
/** * @param i the original iterator * @param f a filter which defines which elements belong to the generated iterator */ public FilterIterator(Iterator<? extends T> i, Predicate<? super T> f) { if (i == null) { throw new IllegalArgumentException("null i"); } if (f == null) { throw new IllegalArgumentException("null f"); } this.i = i; this.f = f; advance(); }