opennlp.model
Class EventCollectorAsStream

java.lang.Object
  extended by opennlp.model.AbstractEventStream
      extended by opennlp.model.EventCollectorAsStream
All Implemented Interfaces:
EventStream

public final class EventCollectorAsStream
extends AbstractEventStream

A wrapper to turn EventCollectors created for Maxent 1.0 into EventStreams for Maxent 1.2. For efficiency, it would be best to convert your EventCollector into a EventStream directly, but this will allow your application to work with Maxent 1.2 with very little recoding.


Constructor Summary
EventCollectorAsStream(EventCollector ec)
           
 
Method Summary
 boolean hasNext()
          Test whether there are any Events remaining in this EventStream.
 Event next()
          Returns the next Event object held in this EventStream.
 
Methods inherited from class opennlp.model.AbstractEventStream
remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventCollectorAsStream

public EventCollectorAsStream(EventCollector ec)
Method Detail

next

public Event next()
Description copied from interface: EventStream
Returns the next Event object held in this EventStream.

Returns:
the Event object which is next in this EventStream

hasNext

public boolean hasNext()
Description copied from interface: EventStream
Test whether there are any Events remaining in this EventStream.

Returns:
true if this EventStream has more Events


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.