Package opennlp.tools.util

# Class AbstractEventStream<T>

java.lang.Object
opennlp.tools.util.AbstractEventStream<T>

Type Parameters:
  `T` - The generic type representing samples.

All Implemented Interfaces:
  `AutoCloseable`, `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event>`

Direct Known Subclasses:
  `AbstractParserEventStream`, `ChunkerEventStream`, `DocumentCategorizerEventStream`, `LanguageDetectorEventStream`, `LemmaSampleEventStream`, `NameFinderEventStream`, `POSSampleEventStream`, `SDEventStream`, `SentimentEventStream`, `TokSpanEventStream`

public abstract class AbstractEventStream<T> extends Object implements opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Event>
A base `ObjectStream` implementation for events.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractEventStream(opennlp.tools.util.ObjectStream<T> samples)`
  Initializes an `AbstractEventStream` with a sample `Iterator`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `final opennlp.tools.ml.model.Event`
  `read()`
  `void`
  `reset()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractEventStream

    public AbstractEventStream(opennlp.tools.util.ObjectStream<T> samples)
    Initializes an `AbstractEventStream` with a sample `Iterator`.
    Parameters:
      `samples` - The `Iterator` that provides the `AbstractEventStream` samples.

- ## Method Details

  - ### read

    public final opennlp.tools.ml.model.Event read() throws IOException
    Specified by:
      `read` in interface `opennlp.tools.util.ObjectStream<T>`
    Throws:
      `IOException`

  - ### reset

    public void reset() throws IOException, UnsupportedOperationException
    Specified by:
      `reset` in interface `opennlp.tools.util.ObjectStream<T>`
    Throws:
      `IOException`
      `UnsupportedOperationException`

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `opennlp.tools.util.ObjectStream<T>`
    Throws:
      `IOException`