Package org.apache.lucene.tests.analysis
Class MockCharFilter
java.lang.Object
java.io.Reader
org.apache.lucene.analysis.CharFilter
org.apache.lucene.tests.analysis.MockCharFilter
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
the purpose of this charfilter is to send offsets out of bounds if the analyzer doesn't use
correctOffset or does incorrect offset math.
-
Field Summary
Fields inherited from class org.apache.lucene.analysis.CharFilter
input -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddOffCorrectMap(int off, int cumulativeDiff) intcorrect(int currentOff) intread()intread(char[] cbuf, int off, int len) Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correctOffsetMethods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
MockCharFilter
-
MockCharFilter
-
-
Method Details
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
correct
public int correct(int currentOff) - Specified by:
correctin classCharFilter
-
addOffCorrectMap
protected void addOffCorrectMap(int off, int cumulativeDiff)
-