|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectavignon.handlers.MessagePicker
This class is used to pick a WAV file at random from a specified directory.
| Method Summary | |
boolean |
accept(java.io.File dir,
java.lang.String name)
|
java.util.Random |
getGenerator()
Allows the programmer to determine the random number generator being used. |
static MessagePicker |
getInstance()
|
java.lang.String |
getRandomMessage(java.lang.String path)
If path matches the shunted path, this method will returned the shunted message. |
void |
setGenerator(java.util.Random value)
Allows the programmer to set the random number generator being used to pick files at random. |
void |
shuntMessage(java.lang.String path,
java.lang.String message)
Sets the message that will be returned for a particular path. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static MessagePicker getInstance()
public void shuntMessage(java.lang.String path,
java.lang.String message)
path - The expected path to shunt.message - The message that will be returned when a random message is requested for the given path.public java.lang.String getRandomMessage(java.lang.String path)
path - The path in which to search for WAV files.
public boolean accept(java.io.File dir,
java.lang.String name)
accept in interface java.io.FilenameFilterpublic java.util.Random getGenerator()
public void setGenerator(java.util.Random value)
value - An instance of a java.math.Random to use for picking messages.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||