org.apache.lucene.analysis
Class BaseCharFilter
java.lang.Object
java.io.Reader
org.apache.lucene.analysis.CharStream
org.apache.lucene.analysis.CharFilter
org.apache.lucene.analysis.BaseCharFilter
- All Implemented Interfaces:
- Closeable, Readable
- Direct Known Subclasses:
- MappingCharFilter
public abstract class BaseCharFilter
- extends CharFilter
Base utility class for implementing a CharFilter
.
You subclass this, and then record mappings by calling
addOffCorrectMap(int, int)
, and then invoke the correct
method to correct an offset.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseCharFilter
public BaseCharFilter(CharStream in)
correct
protected int correct(int currentOff)
- Retrieve the corrected offset.
- Overrides:
correct
in class CharFilter
- Parameters:
currentOff
- current offset
- Returns:
- corrected offset
getLastCumulativeDiff
protected int getLastCumulativeDiff()
addOffCorrectMap
protected void addOffCorrectMap(int off,
int cumulativeDiff)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.