Liferay 6.0.5

com.liferay.portal.kernel.util
Class KMPSearch

java.lang.Object
  extended by com.liferay.portal.kernel.util.KMPSearch

public class KMPSearch
extends Object

See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm.


Constructor Summary
KMPSearch()
           
 
Method Summary
static int[] generateNexts(byte[] pattern)
           
static int[] generateNexts(char[] pattern)
           
static int[] generateNexts(CharSequence pattern)
           
static int search(byte[] text, byte[] pattern)
           
static int search(byte[] text, byte[] pattern, int[] nexts)
           
static int search(byte[] text, int offset, byte[] pattern, int[] nexts)
           
static int search(byte[] text, int offset, int length, byte[] pattern, int[] nexts)
           
static int search(char[] text, char[] pattern)
           
static int search(char[] text, char[] pattern, int[] nexts)
           
static int search(char[] text, int offset, char[] pattern, int[] nexts)
           
static int search(char[] text, int offset, int length, char[] pattern, int[] nexts)
           
static int search(CharSequence text, CharSequence pattern)
           
static int search(CharSequence text, CharSequence pattern, int[] nexts)
           
static int search(CharSequence text, int offset, CharSequence pattern, int[] nexts)
           
static int search(CharSequence text, int offset, int length, CharSequence pattern, int[] nexts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KMPSearch

public KMPSearch()
Method Detail

generateNexts

public static int[] generateNexts(byte[] pattern)

generateNexts

public static int[] generateNexts(char[] pattern)

generateNexts

public static int[] generateNexts(CharSequence pattern)

search

public static int search(byte[] text,
                         byte[] pattern)

search

public static int search(byte[] text,
                         byte[] pattern,
                         int[] nexts)

search

public static int search(byte[] text,
                         int offset,
                         byte[] pattern,
                         int[] nexts)

search

public static int search(byte[] text,
                         int offset,
                         int length,
                         byte[] pattern,
                         int[] nexts)

search

public static int search(char[] text,
                         char[] pattern)

search

public static int search(char[] text,
                         char[] pattern,
                         int[] nexts)

search

public static int search(char[] text,
                         int offset,
                         char[] pattern,
                         int[] nexts)

search

public static int search(char[] text,
                         int offset,
                         int length,
                         char[] pattern,
                         int[] nexts)

search

public static int search(CharSequence text,
                         CharSequence pattern)

search

public static int search(CharSequence text,
                         CharSequence pattern,
                         int[] nexts)

search

public static int search(CharSequence text,
                         int offset,
                         CharSequence pattern,
                         int[] nexts)

search

public static int search(CharSequence text,
                         int offset,
                         int length,
                         CharSequence pattern,
                         int[] nexts)

Liferay 6.0.5