Package zombie.profanity.locales
Class Locale
java.lang.Object
zombie.profanity.locales.Locale
- Direct Known Subclasses:
LocaleChinese
,LocaleEnglish
public abstract class Locale
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List
filterContains
protected java.util.Map
filterWords
protected java.util.List
filterWordsRaw
protected java.lang.String
id
protected java.util.regex.Pattern
pattern
protected java.lang.String
phoneticRules
protected java.util.Map
phonizers
protected int
storeVowelsAmount
protected java.util.ArrayList
whitelistWords
-
Constructor Summary
Constructors Modifier Constructor Description protected
Locale(java.lang.String string)
-
Method Summary
Modifier and Type Method Description void
addFilterContains(java.lang.String string)
void
addFilterRawWord(java.lang.String string)
void
addFilterWord(java.lang.String string)
protected void
addPhonizer(Phonizer phonizer)
void
addWhiteListWord(java.lang.String string)
protected boolean
containsIgnoreCase(java.lang.String string, java.lang.String string2)
java.lang.String
filterWord(java.lang.String string)
java.lang.String
filterWord(java.lang.String string, boolean boolean1)
protected void
finalizeData()
int
getFilterWordsCount()
java.lang.String
getID()
java.lang.String
getPhoneticRules()
protected abstract void
Init()
boolean
isWhiteListedWord(java.lang.String string)
protected void
loadFilterContains()
protected void
loadFilterWords()
protected void
loadWhiteListWords()
protected java.lang.String
phonizeWord(java.lang.String string)
void
removeFilterContains(java.lang.String string)
void
removeFilterWord(java.lang.String string)
void
removeFilterWordRaw(java.lang.String string)
void
removeWhiteListWord(java.lang.String string)
protected java.lang.String
repeatString(int int1, char char1)
java.lang.String
returnMatchSetForWord(java.lang.String string)
java.lang.String
returnPhonizedWord(java.lang.String string)
java.lang.String
validateWord(java.lang.String string, boolean boolean1)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
id
protected java.lang.String id -
storeVowelsAmount
protected int storeVowelsAmount -
phoneticRules
protected java.lang.String phoneticRules -
phonizers
protected java.util.Map phonizers -
filterWords
protected java.util.Map filterWords -
filterWordsRaw
protected java.util.List filterWordsRaw -
filterContains
protected java.util.List filterContains -
whitelistWords
protected java.util.ArrayList whitelistWords -
pattern
protected java.util.regex.Pattern pattern
-
-
Constructor Details
-
Locale
protected Locale(java.lang.String string)
-
-
Method Details
-
getID
public java.lang.String getID() -
getPhoneticRules
public java.lang.String getPhoneticRules() -
getFilterWordsCount
public int getFilterWordsCount() -
Init
protected abstract void Init() -
addWhiteListWord
public void addWhiteListWord(java.lang.String string) -
removeWhiteListWord
public void removeWhiteListWord(java.lang.String string) -
isWhiteListedWord
public boolean isWhiteListedWord(java.lang.String string) -
addFilterWord
public void addFilterWord(java.lang.String string) -
removeFilterWord
public void removeFilterWord(java.lang.String string) -
addFilterContains
public void addFilterContains(java.lang.String string) -
removeFilterContains
public void removeFilterContains(java.lang.String string) -
addFilterRawWord
public void addFilterRawWord(java.lang.String string) -
removeFilterWordRaw
public void removeFilterWordRaw(java.lang.String string) -
repeatString
protected java.lang.String repeatString(int int1, char char1) -
containsIgnoreCase
protected boolean containsIgnoreCase(java.lang.String string, java.lang.String string2) -
filterWord
public java.lang.String filterWord(java.lang.String string) -
filterWord
public java.lang.String filterWord(java.lang.String string, boolean boolean1) -
validateWord
public java.lang.String validateWord(java.lang.String string, boolean boolean1) -
returnMatchSetForWord
public java.lang.String returnMatchSetForWord(java.lang.String string) -
returnPhonizedWord
public java.lang.String returnPhonizedWord(java.lang.String string) -
phonizeWord
protected java.lang.String phonizeWord(java.lang.String string) -
addPhonizer
-
finalizeData
protected void finalizeData() -
loadFilterWords
protected void loadFilterWords() -
loadFilterContains
protected void loadFilterContains() -
loadWhiteListWords
protected void loadWhiteListWords()
-