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 string)
-
Method Summary
Modifier and Type Method Description void
addFilterWord(java.lang.String string)
protected void
addPhonizer(Phonizer phonizer)
void
addWhiteListWord(java.lang.String string)
java.lang.String
filterWord(java.lang.String string)
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 string)
void
removeFilterWord(java.lang.String string)
void
removeWhiteListWord(java.lang.String string)
java.lang.String
returnMatchSetForWord(java.lang.String string)
java.lang.String
returnPhonizedWord(java.lang.String string)
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 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) -
addFilterWord
public void addFilterWord(java.lang.String string) -
removeFilterWord
public void removeFilterWord(java.lang.String string) -
filterWord
public java.lang.String filterWord(java.lang.String string) -
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() -
loadWhiteListWords
protected void loadWhiteListWords()
-