edu.stanford.nlp.util.AbstractIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stanford-parser Show documentation
Show all versions of stanford-parser Show documentation
Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.
package edu.stanford.nlp.util;
import java.util.Iterator;
/**
* Iterator with remove()
defined to throw an
* UnsupportedOperationException
.
*/
public abstract class AbstractIterator implements Iterator {
/** {@inheritDoc} */
@Override
public abstract boolean hasNext();
/** {@inheritDoc} */
@SuppressWarnings("IteratorNextCanNotThrowNoSuchElementException")
@Override
public abstract E next();
/**
* Throws an UnsupportedOperationException
.
*/
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}