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 E as source for elements.
  • 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>