com.annimon.stream.iterator.LsaIterator Maven / Gradle / Ivy
The newest version!
package com.annimon.stream.iterator;
import java.util.Iterator;
import java.util.NoSuchElementException;
/**
* Abstract iterator with implemented {@code remove} method.
* @param the type of the elements
*/
public abstract class LsaIterator implements Iterator {
@Override
public void remove() {
throw new UnsupportedOperationException("remove not supported");
}
@Override
public final T next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
return nextIteration();
}
public abstract T nextIteration();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy