
groovy.stream.iterators.EmptyIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groovy-stream Show documentation
Show all versions of groovy-stream Show documentation
A collection of classes to give a fluent builder for Streams (Lazy Groovy Generators).
The newest version!
package groovy.stream.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class EmptyIterator implements Iterator {
@Override
public boolean hasNext() {
return false;
}
@Override
public T next() {
throw new NoSuchElementException( "EmptyIterator contains no elements" ) ;
}
@Override
public void remove() {
throw new UnsupportedOperationException( "Remove not supported on EmptyIterator" ) ;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy