
com.cantaa.util.EmptyIterator Maven / Gradle / Ivy
package com.cantaa.util;
import java.util.Iterator;
import java.util.NoSuchElementException;
/**
* Empty iterator
* @author Hans Lesmeister
*/
public class EmptyIterator implements Iterator {
public boolean hasNext() {
return false;
}
public T next() {
throw new NoSuchElementException("Iterator is empty");
}
public void remove() {
throw new NoSuchElementException("Iterator is empty");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy