Class BaseCharFilter
Base utility class for implementing a Lucene.Net.Analysis.CharFilter. You subclass this, and then record mappings by calling AddOffCorrectMap(int, int), and then invoke the correct method to correct an offset.
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.Analysis.CharFilters
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public abstract class BaseCharFilter : CharFilter, IDisposable
Constructors
BaseCharFilter(TextReader)
Base utility class for implementing a Lucene.Net.Analysis.CharFilter. You subclass this, and then record mappings by calling AddOffCorrectMap(int, int), and then invoke the correct method to correct an offset.
Declaration
protected BaseCharFilter(TextReader @in)
Parameters
Type | Name | Description |
---|---|---|
TextReader | in |
Properties
LastCumulativeDiff
Base utility class for implementing a Lucene.Net.Analysis.CharFilter. You subclass this, and then record mappings by calling AddOffCorrectMap(int, int), and then invoke the correct method to correct an offset.
Declaration
protected virtual int LastCumulativeDiff { get; }
Property Value
Type | Description |
---|---|
int |
Methods
AddOffCorrectMap(int, int)
Adds an offset correction mapping at the given output stream offset.
Assumption: the offset given with each successive call to this method will not be smaller than the offset given at the previous invocation.
Declaration
protected virtual void AddOffCorrectMap(int off, int cumulativeDiff)
Parameters
Type | Name | Description |
---|---|---|
int | off | The output stream offset at which to apply the correction |
int | cumulativeDiff | The input offset is given by adding this to the output offset |
Correct(int)
Retrieve the corrected offset.
Declaration
protected override int Correct(int currentOff)
Parameters
Type | Name | Description |
---|---|---|
int | currentOff |
Returns
Type | Description |
---|---|
int |