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.Map
filterWords
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 id)
-
Method Summary
Modifier and Type Method Description void
addFilterWord(java.lang.String word)
protected void
addPhonizer(Phonizer p)
void
addWhiteListWord(java.lang.String word)
java.lang.String
filterWord(java.lang.String str)
protected void
finalizeData()
int
getFilterWordsCount()
java.lang.String
getID()
java.lang.String
getPhoneticRules()
protected abstract void
Init()
protected void
loadFilterWords()
protected void
loadWhiteListWords()
protected java.lang.String
phonizeWord(java.lang.String word)
void
removeFilterWord(java.lang.String word)
void
removeWhiteListWord(java.lang.String word)
java.lang.String
returnMatchSetForWord(java.lang.String str)
java.lang.String
returnPhonizedWord(java.lang.String str)
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 -
whitelistWords
protected java.util.ArrayList whitelistWords -
pattern
protected java.util.regex.Pattern pattern
-
-
Constructor Details
-
Locale
protected Locale(java.lang.String id)
-
-
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 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) -
filterWord
public java.lang.String filterWord(java.lang.String str) -
returnMatchSetForWord
public java.lang.String returnMatchSetForWord(java.lang.String str) -
returnPhonizedWord
public java.lang.String returnPhonizedWord(java.lang.String str) -
phonizeWord
protected java.lang.String phonizeWord(java.lang.String word) -
addPhonizer
-
finalizeData
protected void finalizeData() -
loadFilterWords
protected void loadFilterWords() -
loadWhiteListWords
protected void loadWhiteListWords()
-