mirror of https://github.com/apache/lucene.git
LUCENE-1804: allow Tokenizer to specify it's AttributeSource
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@803668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f79712ce82
commit
ab2afad0d1
|
@ -17,6 +17,8 @@ package org.apache.lucene.analysis;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.util.AttributeSource;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -66,6 +68,11 @@ public abstract class Tokenizer extends TokenStream {
|
|||
this.input = input;
|
||||
}
|
||||
|
||||
/** Construct a token stream processing the given input using the given AttributeSource. */
|
||||
protected Tokenizer(AttributeSource source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
/** By default, closes the input Reader. */
|
||||
public void close() throws IOException {
|
||||
input.close();
|
||||
|
|
Loading…
Reference in New Issue