public abstract class SayFunction
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Key |
key
The Key to be spoken to, or null if none
|
private Matrix |
matrix
The Matrix to be spoken to, or null if none
|
private Agent |
sayer
The Agent who spoke to the NetPuzlObject
|
private Token |
token
The Token to be spoken to, or null if none
|
Constructor and Description |
---|
SayFunction(Key key)
Constructs a SayFunction with the Key to be spoken to
|
SayFunction(Matrix matrix)
Constructs a SayFunction with the Matrix to be spoken to
|
SayFunction(Token token)
Constructs a SayFunction with the Token to be spoken to
|
Modifier and Type | Method and Description |
---|---|
Key |
getKey()
Gets the Key to be spoken to
|
Matrix |
getMatrix()
Gets the Matrix to be spoken to
|
Agent |
getSayer()
Gets the Agent who spoke to the NetPuzlObject
|
Token |
getToken()
Gets the Token to be spoken to
|
abstract void |
say(java.lang.String text)
Each NetPuzlObject will have its own action to perform when spoken to
|
void |
setKey(Key key)
Sets the Key to be spoken to
|
void |
setMatrix(Matrix matrix)
Sets the Matrix to be spoken to
|
void |
setSayer(Agent sayer)
Sets the Agent who spoke to the NetPuzlObject
|
void |
setToken(Token token)
Sets the Token to be spoken to
|
private Key key
private Matrix matrix
private Token token
private Agent sayer
public SayFunction(Key key)
key
- The Key to construct this SayFunction withpublic SayFunction(Matrix matrix)
matrix
- The Matrix to construct this SayFunction withpublic SayFunction(Token token)
token
- The Token to construct this SayFunction withpublic Key getKey()
public Matrix getMatrix()
public Agent getSayer()
public Token getToken()
public abstract void say(java.lang.String text)
text
- The command spoken to the NetPuzlObjectpublic void setKey(Key key)
key
- The Key to set this SayFunction topublic void setMatrix(Matrix matrix)
matrix
- The Matrix to set this SayFunction topublic void setSayer(Agent sayer)
sayer
- The Agent to set this SayFunction topublic void setToken(Token token)
token
- The Token to set this SayFunction to