public abstract class TextSearcher
extends java.lang.Object
Constructor and Description |
---|
TextSearcher() |
Modifier and Type | Method and Description |
---|---|
abstract int |
countOccurences(java.lang.String text,
java.lang.String pattern,
boolean wholeWordOnly)
Counts how often the
pattern occurs in the text . |
public abstract int countOccurences(java.lang.String text, java.lang.String pattern, boolean wholeWordOnly)
pattern
occurs in the text
. If wholeWordOnly
is true, a match counts only if the pattern is found as a whole word, otherwise matches inside of words also count.