All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.nlp.util.AbstractIterator Maven / Gradle / Ivy

Go to download

Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.

There is a newer version: 3.9.2
Show newest version
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();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy