|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.classes.filters.SpeechFilter wyvern.lib.classes.filters.PigLatin
A speech filter that makes people talk in Pig Latin.
Nested Class Summary |
Nested classes inherited from class wyvern.lib.classes.filters.SpeechFilter |
SpeechFilter.Replacement |
Field Summary |
Fields inherited from class wyvern.lib.classes.filters.SpeechFilter |
agents_ |
Constructor Summary | |
PigLatin()
|
Method Summary | |
java.lang.String |
applyFilter(java.lang.String text)
Converts a string into paladin-speak. |
java.lang.String |
convertWord(java.lang.String word)
Converts a word into pig-latin. |
java.lang.Object |
createClone()
Produces a clone of the property for the caller. |
void |
detachFromAgent(Commandable agent)
Stops filtering the specified agent. |
void |
filterAgent(Commandable agent)
Attaches the filter to the specified agent. |
boolean |
isVowel(char c)
Returns true if it's a vowel (not Y) |
static void |
main(java.lang.String[] args)
Tests the filter. |
void |
methodCalled(java.lang.String hookName,
MethodHookable target,
java.lang.Object data)
Our "remove-curse" method was called. |
static java.lang.String |
replace(java.lang.String s,
java.lang.String old,
java.lang.String rep)
Replaces all occurrences of first string with second string. |
java.lang.String |
toString()
Returns name of filter. |
Methods inherited from class wyvern.lib.classes.filters.SpeechFilter |
addGlobalPattern, addSinglePattern, filterSay, filterShout, filterTell, filterWhisper, getGlobalPatterns, getSinglePatterns, hookEvent, notifyAdd, notifyRemove, shutdown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PigLatin()
Method Detail |
public java.lang.String applyFilter(java.lang.String text)
applyFilter
in class SpeechFilter
text
- the initial text of the say/shout/tell
public java.lang.String convertWord(java.lang.String word)
word
- a wordpublic boolean isVowel(char c)
public static java.lang.String replace(java.lang.String s, java.lang.String old, java.lang.String rep)
public java.lang.String toString()
public java.lang.Object createClone()
createClone
in interface MutableProperty
public void filterAgent(Commandable agent)
filterAgent
in class SpeechFilter
public void detachFromAgent(Commandable agent)
SpeechFilter
detachFromAgent
in class SpeechFilter
public void methodCalled(java.lang.String hookName, MethodHookable target, java.lang.Object data)
methodCalled
in interface MethodHookCallback
hookName
- the name of the hook being runtarget
- the object on which the method was invoked:
a GameMap or GameObject.data
- a method-specific data object; can be null.
Check the documentation for the method hook to see if
any data is passed to the callbacks.public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |