public static final class FinderFactory.WholeWordsFwdFinder extends FinderFactory.GenericFwdFinder implements FinderFactory.StringFinder
found| Constructor and Description |
|---|
FinderFactory.WholeWordsFwdFinder(BaseDocument doc,
String s,
boolean matchCase) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFoundLength()
Get the length of the found string.
|
void |
reset()
Reset the finder
|
protected int |
scan(char ch,
boolean lastChar)
This function decides if it found a desired string or not.
|
findisFoundpublic FinderFactory.WholeWordsFwdFinder(BaseDocument doc, String s, boolean matchCase)
public int getFoundLength()
FinderFactory.StringFindergetFoundLength in interface FinderFactory.StringFinderpublic void reset()
FinderFactory.AbstractFinderreset in interface Finderreset in class FinderFactory.AbstractFinderprotected int scan(char ch,
boolean lastChar)
FinderFactory.GenericFwdFinderscan in class FinderFactory.GenericFwdFinderfound = true and returns
how many characters back the searched string begins in forward
direction (0 stands for current character).
For example if the function looks for word 'yes' and it gets
's' as parameter it sets found = true and returns -2.
If the string is not yet found it returns how many characters it should go
in forward direction (in this case it would usually be 1).
The next searched character will be that one requested.Built on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.