C# Class Lucene.Net.Analysis.CharFilter.BaseCharFilter

Base utility class for implementing a CharFilter. You subclass this, and then record mappings by calling #addOffCorrectMap, and then invoke the correct method to correct an offset.
Inheritance: CharFilter
Datei anzeigen Open project: paulirwin/lucene.net

Protected Methods

Method Description
AddOffCorrectMap ( int off, int cumulativeDiff ) : void

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.

BaseCharFilter ( TextReader @in ) : System.Diagnostics
Correct ( int currentOff ) : int

Retrieve the corrected offset.

Method Details

AddOffCorrectMap() protected method

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.

protected AddOffCorrectMap ( int off, int cumulativeDiff ) : void
off int The output stream offset at which to apply the correction
cumulativeDiff int The input offset is given by adding this /// to the output offset
return void

BaseCharFilter() protected method

protected BaseCharFilter ( TextReader @in ) : System.Diagnostics
@in System.IO.TextReader
return System.Diagnostics

Correct() protected method

Retrieve the corrected offset.
protected Correct ( int currentOff ) : int
currentOff int
return int