CollectionObjectStream (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.util, class: CollectionObjectStream

Package opennlp.tools.util

# Class CollectionObjectStream<E>

java.lang.Object
opennlp.tools.util.CollectionObjectStream<E>

Type Parameters:
  `E` - The generic type of the elements.

All Implemented Interfaces:
  `AutoCloseable`, `opennlp.tools.util.ObjectStream<E>`

public class CollectionObjectStream<E> extends Object implements opennlp.tools.util.ObjectStream<E>
An `ObjectStream` implementation that works on a `Collection` of `CollectionObjectStream` as source for elements.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CollectionObjectStream(Collection<E> collection)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `E`
  `read()`
  `void`
  `reset()`

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

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

- ## Constructor Details

  - ### CollectionObjectStream

    public CollectionObjectStream(Collection<E> collection)

- ## Method Details

  - ### read

    public E read()
    Specified by:
      `read` in interface `opennlp.tools.util.ObjectStream<E>`

  - ### reset

    public void reset()
    Specified by:
      `reset` in interface `opennlp.tools.util.ObjectStream<E>`

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `opennlp.tools.util.ObjectStream<E>`