org.apache.james.ai.classic
Class TokenCollector
java.lang.Object
org.apache.james.ai.classic.Tokenizer
org.apache.james.ai.classic.TokenCollector
public class TokenCollector
- extends Tokenizer
Collects tokens.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenCollector
public TokenCollector(Collection<String> tokens)
- Constructs a collector which collects tokens
into the given collection.
- Parameters:
tokens
- not null
collect
public TokenCollector collect(Reader stream)
throws IOException
- Collects tokens from stream.
- Parameters:
stream
- not null
- Returns:
- this, not null
- Throws:
IOException
next
protected void next(String token)
- Adds the token to the collection.
- Specified by:
next
in class Tokenizer
- Parameters:
token
- not null
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.