|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.text.TextFinder
public class TextFinder
A text finder which uses generic search algorithms.
| Constructor Summary | |
|---|---|
TextFinder()
Initializes a text finder with a null search string, case sensitivity turned on, and search backwards turned off. |
|
TextFinder(java.lang.String searchString)
Initializes a text finder with the specified search string, case sensitivity turned on, and search backwards turned off. |
|
TextFinder(java.lang.String searchString,
boolean caseInsensitive)
Initializes a text finder with the specified search string and case sensitivity, and search backwards turned off. |
|
| Method Summary | |
|---|---|
TextFinderResult |
findText(char[] buffer,
int bufferLength,
int fromIndex)
Returns the first matching text range beginning at the specified location using the specified search parameters. |
TextFinderResult |
findTextBackwards(char[] buffer,
int bufferLength,
int fromIndex)
|
TextFinderResult |
findTextForwards(char[] buffer,
int bufferLength,
int fromIndex)
|
boolean |
getCaseInsensitive()
Returns true if the text finder will ignore case; false otherwise. |
boolean |
getSearchBackwards()
Returns true if the text finder will search backwards; false otherwise. |
java.lang.String |
getSearchString()
Returns the current search string. |
void |
setCaseInsensitive(boolean state)
When set to true, the text finder will ignore case. |
void |
setSearchBackwards(boolean state)
When set to true, the text finder will search backwards. |
void |
setSearchString(java.lang.String str)
Sets the search string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextFinder()
public TextFinder(java.lang.String searchString)
public TextFinder(java.lang.String searchString,
boolean caseInsensitive)
| Method Detail |
|---|
public boolean getCaseInsensitive()
public boolean getSearchBackwards()
public java.lang.String getSearchString()
public TextFinderResult findText(char[] buffer,
int bufferLength,
int fromIndex)
findText in interface ITextFinderbuffer - 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.
public TextFinderResult findTextBackwards(char[] buffer,
int bufferLength,
int fromIndex)
public TextFinderResult findTextForwards(char[] buffer,
int bufferLength,
int fromIndex)
public void setCaseInsensitive(boolean state)
public void setSearchBackwards(boolean state)
public void setSearchString(java.lang.String str)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||