org.jext.search
Class BoyerMooreSearchMatcher
java.lang.Object
org.jext.search.BoyerMooreSearchMatcher
- All Implemented Interfaces:
- SearchMatcher
- public class BoyerMooreSearchMatcher
- extends java.lang.Object
- implements SearchMatcher
Constructor Summary |
BoyerMooreSearchMatcher(java.lang.String pattern,
java.lang.String replace,
boolean ignoreCase,
boolean reverseSearch,
boolean script,
java.lang.String pythonScript)
Creates a new string literal matcher. |
Method Summary |
int |
match(char[] text,
int offset,
int length)
|
int[] |
nextMatch(javax.swing.text.Segment text)
Returns the offset of the first match of the specified text
within this matcher. |
java.lang.String |
substitute(java.lang.String text)
Returns the specified text, with any substitution specified
within this matcher performed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoyerMooreSearchMatcher
public BoyerMooreSearchMatcher(java.lang.String pattern,
java.lang.String replace,
boolean ignoreCase,
boolean reverseSearch,
boolean script,
java.lang.String pythonScript)
- Creates a new string literal matcher.
nextMatch
public int[] nextMatch(javax.swing.text.Segment text)
- Returns the offset of the first match of the specified text
within this matcher.
- Specified by:
nextMatch
in interface SearchMatcher
- Parameters:
text
- The text to search in
- Returns:
- an array where the first element is the start offset
of the match, and the second element is the end offset of
the match
substitute
public java.lang.String substitute(java.lang.String text)
throws java.lang.Exception
- Returns the specified text, with any substitution specified
within this matcher performed.
- Specified by:
substitute
in interface SearchMatcher
- Parameters:
text
- The text
- Returns:
- The changed string
- Throws:
java.lang.Exception
match
public int match(char[] text,
int offset,
int length)
Copyright © 2002 Romain Guy.