com.cometway.text
Interface ITextFinder

All Known Implementing Classes:
RegExpTextFinder, TextFinder

public interface ITextFinder

Interface for implementing an abstract text searching algorithm.


Method Summary
 TextFinderResult findText(char[] buffer, int bufferLength, int fromIndex)
          Returns the first matching text range beginning at the specified location.
 

Method Detail

findText

TextFinderResult findText(char[] buffer,
                          int bufferLength,
                          int fromIndex)
Returns the first matching text range beginning at the specified location. This interface makes it possible to search a text buffer in any direction or manner using any sort of algorithm suitable for the search.

Parameters:
buffer - a character array where the text to be searched is located.
bufferLength - the number of valid characters in the character array.
fromIndex - the index from where the search should begin.
Returns:
an TextFinderResult representing the matching range of text.