public static class FinderFactory.StringBwdFinder extends FinderFactory.GenericBwdFinder implements FinderFactory.StringFinder
found
Constructor and Description |
---|
StringBwdFinder(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.
|
find
isFound
public StringBwdFinder(String s, boolean matchCase)
public int getFoundLength()
FinderFactory.StringFinder
getFoundLength
in interface FinderFactory.StringFinder
public void reset()
FinderFactory.AbstractFinder
reset
in interface Finder
reset
in class FinderFactory.AbstractFinder
protected int scan(char ch, boolean lastChar)
FinderFactory.GenericBwdFinder
scan
in class FinderFactory.GenericBwdFinder
found = true
and returns
how many characters back the searched string begins in backward
direction (0 stands for current character). It is usually 0 as the
finder usually decides after the last required character but it's
not always the case e.g. for whole-words-only search it can be 1 or so.
If the string is not yet found it returns how many characters it should go
in backward direction (in this case it would usually be -1).
The next searched character will be that one requested.