Example usage for org.apache.lucene.analysis Token reinit

List of usage examples for org.apache.lucene.analysis Token reinit

Introduction

In this page you can find the example usage for org.apache.lucene.analysis Token reinit.

Prototype

public void reinit(Token prototype) 

Source Link

Document

Copy the prototype token's fields into this one.

Usage

From source file:org.apache.uima.lucas.indexer.test.util.CollectionTokenStream.java

License:Apache License

@Override
public Token next(Token nextToken) throws IOException {
    if (tokenIterator.hasNext()) {
        Token nextCollectionToken = tokenIterator.next();
        nextToken.reinit(nextCollectionToken);
        return nextToken;
    } else/*from w  ww .  j  a va 2s.  c o m*/
        return null;
}