com.stevesoft.pat
Class SkipBMH
java.lang.Object
|
+--com.stevesoft.pat.Skip
|
+--com.stevesoft.pat.SkipBMH
- public class SkipBMH
- extends Skip
Like Skip, but implements a
Boyer-Moore-Horspool type search
method that has been modified to be more like a "T-search" (see
the Michael Tamm''s article in C'T, magazin fuer computer und technic, August 97
p 292). Yet another important source of information for me was
the
Deep Magic article on string searching. As of this writing, I can
beat String's indexOf method in many cases.
- See Also:
Skip,
Skip2
|
Constructor Summary |
SkipBMH(java.lang.String pt)
|
SkipBMH(java.lang.String pt,
boolean ign)
|
SkipBMH(java.lang.String pt,
boolean ign,
int offset)
|
|
Method Summary |
int |
find(java.lang.String s,
int start,
int end)
|
int |
find(StringLike s,
int start,
int end)
Searches a given region of text beginning at position start
and ending at position end for the skip object. |
int |
search(java.lang.String s)
|
int |
searchFrom(java.lang.String s,
int start)
|
int |
searchRegion(java.lang.String s,
int start,
int end)
Set to true if you only want to compare two of the
characters in the String. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SkipBMH
public SkipBMH(java.lang.String pt,
boolean ign)
SkipBMH
public SkipBMH(java.lang.String pt)
SkipBMH
public SkipBMH(java.lang.String pt,
boolean ign,
int offset)
searchRegion
public final int searchRegion(java.lang.String s,
int start,
int end)
- Set to true if you only want to compare two of the
characters in the String.
searchFrom
public final int searchFrom(java.lang.String s,
int start)
search
public final int search(java.lang.String s)
find
public int find(java.lang.String s,
int start,
int end)
find
public int find(StringLike s,
int start,
int end)
- Description copied from class: Skip
- Searches a given region of text beginning at position start
and ending at position end for the skip object.
- Overrides:
- find in class Skip