org.d2ab.iterator.ImmutableIterator Maven / Gradle / Ivy
package org.d2ab.iterator;
import java.util.Iterator;
public class ImmutableIterator extends DelegatingUnaryIterator {
public ImmutableIterator(Iterator extends T> iterator) {
super(iterator);
}
@Override
public T next() {
return iterator.next();
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}