org.basex.util.ft
Class FTIterator

java.lang.Object
  extended by org.basex.util.ft.FTIterator
All Implemented Interfaces:
java.util.Iterator<FTSpan>
Direct Known Subclasses:
FTLexer, Stemmer, Tokenizer

public abstract class FTIterator
extends java.lang.Object
implements java.util.Iterator<FTSpan>

Full-text iterator.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Constructor Summary
FTIterator()
           
 
Method Summary
abstract  FTIterator init(byte[] text)
          Initializes the iterator.
abstract  byte[] nextToken()
          Returns the next token.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next
 

Constructor Detail

FTIterator

public FTIterator()
Method Detail

init

public abstract FTIterator init(byte[] text)
Initializes the iterator.

Parameters:
text - text
Returns:
self reference

nextToken

public abstract byte[] nextToken()
Returns the next token. May be called as an alternative to Iterator.next() to avoid the creation of new FTSpan instances.

Returns:
token

remove

public final void remove()
Specified by:
remove in interface java.util.Iterator<FTSpan>