org.jext.search
Interface SearchMatcher

All Known Implementing Classes:
BoyerMooreSearchMatcher, RESearchMatcher

public interface SearchMatcher

An abstract interface for matching strings.

Version:
$Id: SearchMatcher.java,v 1.1.1.1 2001/08/20 22:33:30 gfx Exp $
Author:
Slava Pestov

Method Summary
 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.
 

Method Detail

nextMatch

public int[] nextMatch(javax.swing.text.Segment text)
Returns the offset of the first match of the specified text within this matcher.

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.

Parameters:
text - The text
Returns:
The changed string
Throws:
java.lang.Exception


Copyright ? 2002 Romain Guy.