You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2009/07/25 11:23:08 UTC
svn commit: r797727 -
/lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java
Author: uschindler
Date: Sat Jul 25 09:23:07 2009
New Revision: 797727
URL: http://svn.apache.org/viewvc?rev=797727&view=rev
Log:
LUCENE-1693: Add AttributeSource ctors to Tokenizer
Modified:
lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java
Modified: lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java?rev=797727&r1=797726&r2=797727&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java Sat Jul 25 09:23:07 2009
@@ -38,16 +38,34 @@
/** Construct a tokenizer with null input. */
protected Tokenizer() {}
-
+
/** Construct a token stream processing the given input. */
protected Tokenizer(Reader input) {
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();