mirror of https://github.com/apache/lucene.git
LUCENE-1693: Add AttributeSource ctors to Tokenizer
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@797727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c311d5730c
commit
187ac2b4f3
|
@ -44,10 +44,28 @@ public abstract class Tokenizer extends TokenStream {
|
|||
this.input = CharReader.get(input);
|
||||
}
|
||||
|
||||
/** Construct a token stream processing the given input. */
|
||||
protected Tokenizer(CharStream input) {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
/** Construct a tokenizer with null input using the given AttributeFactory. */
|
||||
protected Tokenizer(AttributeFactory factory) {
|
||||
super(factory);
|
||||
}
|
||||
|
||||
/** Construct a token stream processing the given input using the given AttributeFactory. */
|
||||
protected Tokenizer(AttributeFactory factory, Reader input) {
|
||||
super(factory);
|
||||
this.input = CharReader.get(input);
|
||||
}
|
||||
|
||||
/** Construct a token stream processing the given input using the given AttributeFactory. */
|
||||
protected Tokenizer(AttributeFactory factory, CharStream input) {
|
||||
super(factory);
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
/** By default, closes the input Reader. */
|
||||
public void close() throws IOException {
|
||||
input.close();
|
||||
|
|
Loading…
Reference in New Issue