|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.game.AbstractTeam
public abstract class AbstractTeam
Provides base functionality for teams in the game framework. A team instance represents one team of agents. Examples include the teams White and Black in chess, or partners in bridge. Teams may also have associated tokens.
Field Summary |
---|
Fields inherited from interface org.vizzini.game.ITeam |
---|
NAME_PROPERTY |
Constructor Summary | |
---|---|
AbstractTeam()
Construct this object. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
void |
configure(Properties properties,
int index)
Configure this team. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
IAgentCollection |
getAgentCollection()
Return the agent collection. |
String |
getName()
Return this agent's name. |
protected PropertyChangeManager |
getPropertyChangeManager()
Return the property change manager. |
ITokenCollection |
getTokenCollection()
Return the token collection. |
int |
hashCode()
Returns a hash code value for the object. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
reset()
Reset to the initial state. |
void |
setName(String name)
Set the name to the given name. |
String |
toString()
Return a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractTeam()
Method Detail |
---|
public 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.
addPropertyChangeListener
in interface ITeam
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener
to be
added.public void configure(Properties properties, int index) throws InstantiationException, IllegalAccessException
configure
in interface ITeam
properties
- Source of configuration information.index
- Index of this team's properties.
InstantiationException
IllegalAccessException
public boolean equals(Object object)
equals
in class Object
object
- The object to compare.public IAgentCollection getAgentCollection()
getAgentCollection
in interface ITeam
public String getName()
getName
in interface ITeam
public ITokenCollection getTokenCollection()
getTokenCollection
in interface ITeam
public int hashCode()
hashCode
in class Object
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener
for a specific property.
removePropertyChangeListener
in interface ITeam
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener
to be
removed.public void reset()
reset
in interface ITeam
public void setName(String name)
setName
in interface ITeam
name
- The new name.public String toString()
toString
in class Object
protected PropertyChangeManager getPropertyChangeManager()
|
||||||||||
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 |