Package zombie.profanity
Class ProfanityFilter
java.lang.Object
zombie.profanity.ProfanityFilter
public class ProfanityFilter
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG
static java.lang.String
LOCALES_DIR
-
Method Summary
Modifier and Type Method Description void
addFilterWord(java.lang.String word)
void
addLocale(Locale l)
void
addLocale(Locale l, boolean setDefault)
void
addWhiteListWord(java.lang.String word)
void
enable(boolean b)
java.lang.String
filterString(java.lang.String str)
int
getFilterWordsCount()
static ProfanityFilter
getInstance()
Locale
getLocale()
boolean
isEnabled()
static void
printDebug(java.lang.String str)
void
removeFilterWord(java.lang.String word)
void
removeWhiteListWord(java.lang.String word)
void
setLocale(java.lang.String locale)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
DEBUG
public static boolean DEBUG -
LOCALES_DIR
public static java.lang.String LOCALES_DIR
-
-
Method Details
-
getInstance
-
printDebug
public static void printDebug(java.lang.String str) -
enable
public void enable(boolean b) -
isEnabled
public boolean isEnabled() -
getFilterWordsCount
public int getFilterWordsCount() -
addLocale
-
addLocale
-
getLocale
-
addWhiteListWord
public void addWhiteListWord(java.lang.String word) -
removeWhiteListWord
public void removeWhiteListWord(java.lang.String word) -
addFilterWord
public void addFilterWord(java.lang.String word) -
removeFilterWord
public void removeFilterWord(java.lang.String word) -
setLocale
public void setLocale(java.lang.String locale) -
filterString
public java.lang.String filterString(java.lang.String str)
-