|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IToken
Defines methods required by tokens in the game framework. A token instance encapsulates the different types and behavior of game tokens.
Field Summary | |
---|---|
static String |
AGENT_PROPERTY
Agent property name. |
static String |
NAME_PROPERTY
Name property name. |
static String |
POSITION_PROPERTY
Position property name. |
static String |
TEAM_PROPERTY
Team property name. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
Object |
clone()
Return a clone of this instance. |
void |
configure(Properties properties,
int index)
Configure this token. |
IAgent |
getAgent()
Return this token's agent. |
int |
getIndex()
|
String |
getName()
Return this token's name. |
IPosition |
getPosition()
Return the position. |
ITeam |
getTeam()
Return this token's team. |
int |
getValue()
Return the value of this token. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
setAgent(IAgent agent)
Set the associated agent. |
void |
setName(String name)
Set the name to the given value. |
void |
setPosition(IPosition position)
Set the position. |
void |
setTeam(ITeam team)
Set the associated team. |
void |
setValue(int value)
Set the value of this token. |
Field Detail |
---|
static final String POSITION_PROPERTY
static final String NAME_PROPERTY
static final String AGENT_PROPERTY
static final String TEAM_PROPERTY
Method Detail |
---|
int getIndex()
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener
for a specific property. The
listener will be invoked only when a call on
firePropertyChange
names that specific property.
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener
to be
added.Object clone()
void configure(Properties properties, int index)
properties
- Source of configuration information.index
- Index of this token's properties.IAgent getAgent()
String getName()
IPosition getPosition()
ITeam getTeam()
int getValue()
void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener
for a specific property.
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener
to be
removed.void setAgent(IAgent agent)
agent
- The associated agent.void setName(String name)
name
- The new name.void setPosition(IPosition position)
void setTeam(ITeam team)
team
- The associated team.void setValue(int value)
value
- The new value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |