public class Key extends NetPuzlObject
Modifier and Type | Field and Description |
---|---|
private SayFunction |
sayFunction
The function that processes spoken commands for this Key
|
Constructor and Description |
---|
Key(ObjID objID,
Attributes attributes,
java.util.Map<ObjID,NetPuzlObject> cache)
Constructs a Key with the given parameters
|
Modifier and Type | Method and Description |
---|---|
TSet |
createSetTag()
Overrides createSetTag because our Keys do not use background colors,
foreground colors, y values, or Images
|
void |
doSpokenCommand(java.lang.String text)
Performs the command spoken to this Key
|
SayFunction |
getSayFunction()
Gets the function that processes spoken commands for this Key
|
boolean |
hasSpokenCommand()
Determines if this Key has a function to process spoken commands
|
void |
setSayFunction(SayFunction sayFunction)
Sets the function that processes spoken commands for this Key
|
fullToString, getAttributes, getObjID, setAttributes, toString
private SayFunction sayFunction
public Key(ObjID objID, Attributes attributes, java.util.Map<ObjID,NetPuzlObject> cache)
objID
- The object ID to construct this Key withattributes
- The Attributes to construct this Key withcache
- The Map to cache this Key inpublic TSet createSetTag()
createSetTag
in class NetPuzlObject
NetPuzlObject.createSetTag()
public void doSpokenCommand(java.lang.String text)
text
- The command spoken to this Keypublic SayFunction getSayFunction()
public boolean hasSpokenCommand()
public void setSayFunction(SayFunction sayFunction)
sayFunction
- The function that processes spoken commands to set
this Key to