| java.lang.Object org.gjt.sp.jedit.search.SearchMatcher org.gjt.sp.jedit.search.BoyerMooreSearchMatcher
BoyerMooreSearchMatcher | public class BoyerMooreSearchMatcher extends SearchMatcher (Code) | | Implements literal search using the Boyer-Moore algorithm.
version: $Id: BoyerMooreSearchMatcher.java 9481 2007-05-02 00:34:44Z k_satoda $ |
Method Summary | |
public int | match(CharSequence text, boolean reverse) | public SearchMatcher.Match | nextMatch(CharSequence text, boolean start, boolean end, boolean firstTime, boolean reverse) Returns the offset of the first match of the specified text
within this matcher.
Parameters: text - The text to search in Parameters: start - True if the start of the segment is the beginning of thebuffer Parameters: end - True if the end of the segment is the end of the buffer Parameters: firstTime - If false and the search string matched at the startoffset with length zero, automatically find next match Parameters: reverse - If true, searching will be performed in a backwarddirection. | public String | toString() |
BoyerMooreSearchMatcher | public BoyerMooreSearchMatcher(String pattern, boolean ignoreCase)(Code) | | Creates a new string literal matcher.
Parameters: pattern - the search pattern Parameters: ignoreCase - true if you want to ignore case |
match | public int match(CharSequence text, boolean reverse)(Code) | | a good introduction to the Boyer-Moore fast string matching
algorithm may be found on Moore's website at:
http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/
since: jEdit 4.3pre5 |
nextMatch | public SearchMatcher.Match nextMatch(CharSequence text, boolean start, boolean end, boolean firstTime, boolean reverse)(Code) | | Returns the offset of the first match of the specified text
within this matcher.
Parameters: text - The text to search in Parameters: start - True if the start of the segment is the beginning of thebuffer Parameters: end - True if the end of the segment is the end of the buffer Parameters: firstTime - If false and the search string matched at the startoffset with length zero, automatically find next match Parameters: reverse - If true, searching will be performed in a backwarddirection. an array where the first element is the start offsetof the match, and the second element is the end offset ofthe match since: jEdit 4.2pre4 |
Fields inherited from org.gjt.sp.jedit.search.SearchMatcher | protected Match returnValue(Code)(Java Doc)
|
Methods inherited from org.gjt.sp.jedit.search.SearchMatcher | public boolean isMatchingEOL()(Code)(Java Doc) abstract public Match nextMatch(CharSequence text, boolean start, boolean end, boolean firstTime, boolean reverse)(Code)(Java Doc)
|
|
|