Class BoyerMoore

java.lang.Object
  |
  +--BoyerMoore

public class BoyerMoore
extends java.lang.Object

Implementation of the Boyer-Moore Algorithm for pattern matching.


Field Summary
static int ALPHABET_SIZE
           
 
Constructor Summary
BoyerMoore(java.lang.String pattern, java.lang.String text)
           
 
Method Summary
 int match()
          Searches the pattern in the text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHABET_SIZE

public static final int ALPHABET_SIZE
Constructor Detail

BoyerMoore

public BoyerMoore(java.lang.String pattern,
                  java.lang.String text)
Method Detail

match

public int match()
Searches the pattern in the text. Returns the position of the first occurrence, if found and -1 otherwise.