|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jaxfront.core.util.stringSearch.StringSearch
com.jaxfront.core.util.stringSearch.ShiftOr
com.jaxfront.core.util.stringSearch.ShiftOrWildcards
public class ShiftOrWildcards
An implementation of the Shift-Or algorithm with wildcards ("don't care"
symbols). The wildcard character is initially '?', but any character can
be used through the processChars(char[], char) and the
processBytes(byte[], byte) methods.
Preprocessing: O(2n + ∑) time Searching : O(mn / log n) (worst case and average)
processBytes(byte[], byte),
processChars(char[], char),
com.eaio.stringsearch.ShiftOr| Field Summary | |
|---|---|
static char |
wildcard
The wildcard character (initially '?'). |
| Constructor Summary | |
|---|---|
ShiftOrWildcards()
Constructor for ShiftOrWildcards. |
|
| Method Summary | |
|---|---|
java.lang.Object |
processBytes(byte[] pattern)
Pre-processing of the pattern. |
java.lang.Object |
processBytes(byte[] pattern,
byte w)
Pre-processing of the pattern. |
java.lang.Object |
processChars(char[] pattern)
Pre-processing of the pattern. |
java.lang.Object |
processChars(char[] pattern,
char w)
Pre-processing of the pattern. |
java.lang.Object |
processString(java.lang.String pattern,
char w)
Pre-processing of the pattern. |
| Methods inherited from class com.jaxfront.core.util.stringSearch.ShiftOr |
|---|
searchBytes, searchChars |
| Methods inherited from class com.jaxfront.core.util.stringSearch.StringSearch |
|---|
equals, getAllOccurences, hashCode, processString, searchBytes, searchBytes, searchBytes, searchBytes, searchBytes, searchChars, searchChars, searchChars, searchChars, searchChars, searchString, searchString, searchString, searchString, searchString, searchString, toString, toStringBuffer, usesNative, usesReflection |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static char wildcard
| Constructor Detail |
|---|
public ShiftOrWildcards()
| Method Detail |
|---|
public java.lang.Object processBytes(byte[] pattern)
int array. The
wildcard character is obtained from the static wildcard field.
processBytes in class ShiftOrpattern - the byte array containing the pattern, may not
be null
com.eaio.stringsearch.StringSearch#processBytes(byte[]),
processBytes(byte[], byte)
public java.lang.Object processBytes(byte[] pattern,
byte w)
int array.
pattern - the byte array containing the pattern, may not
be nullw - the wildcard byte character
int arraypublic java.lang.Object processChars(char[] pattern)
CharIntMap. The wildcard
character is obtained from the static wildcard field.
processChars in class ShiftOrpattern - the char array containing the pattern, may not
be null
CharIntMapStringSearch.processChars(char[]),
processChars(char[], char)
public java.lang.Object processChars(char[] pattern,
char w)
CharIntMap.
pattern - the char array containing the pattern, may not
be nullw - the wildcard character
CharIntMap.
public java.lang.Object processString(java.lang.String pattern,
char w)
CharIntMap.
pattern - the String containing the pattern, may not be
nullw - the wildcard character
CharIntMap.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||