Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.uima.analysis_engine
Interface JCasIterator

    public interface JCasIterator

An iterator over a collection of JCAS objects. One use for this interface is to allow an application to iterate over all of the CASes produced by as output of the `AnalysisEngine.processAndOutputNewCASes(JCas)` method.

Method Summary
`boolean` | `hasNext()` Checks if there are more JCASes to be returned by the iterator.
`JCas` | `next()` Gets the next JCAS from the iterator.
`void` | `release()` Releases any CASes owned by this JCasIterator.

Method Detail

### hasNext

    boolean hasNext()
                    throws AnalysisEngineProcessException

  Checks if there are more JCASes to be returned by the iterator.

  Returns:
    true if there are more JCASes to be returned, false if not
  Throws:
    `AnalysisEngineProcessException` - if a failure has occurred during processing. If an exception is thrown, this indicates that processing has aborted, so no further calls to the JCasIterator should be made.

### next

    JCas next()
              throws AnalysisEngineProcessException

  Gets the next JCAS from the iterator.

  Returns:
    the next JCAS.
  Throws:
    `AnalysisEngineProcessException` - if a failure has occurred during processing. If an exception is thrown, this indicates that processing has aborted, so no further calls to the JCasIterator should be made.

### release

    void release()

  Releases any CASes owned by this JCasIterator. You only need to Call this method if you stop using a CasIterator before you have iterated all the way through.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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