|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdemo.helicopter.RelationshipRedSquad
Red Squad relationship
| Field Summary | |
int |
maxMembers
Maximum allowed members in a red squad relationship. |
int |
minMembers
Minimum allowed members in a red squad relationship. |
| Constructor Summary | |
RelationshipRedSquad()
No-argument constructor for RelationshipSquad class |
|
| Method Summary | |
boolean |
addAgent(Agent pCTFAgent)
Adds the passed in agent to the list of members of this relationship. |
boolean |
conditionsMaintained()
Verifies conditions are maintained to continue this relationship. |
boolean |
conditionsMet(Agent pCTFAgent,
java.util.Vector sensedAgents)
Verifies conditions are met to form this relationship. |
void |
destroyRelationship()
When conditions are no longer met to maintain this relationship, this method is called. |
java.lang.String |
getClassName()
Returns The class name of this relationship. |
int |
getIDNumber()
Returns the ID number of this relationship. |
java.util.Vector |
getMembers()
Returns the vector of members currently in this relationship |
void |
issueRoles()
Issues the appropriate roles to each member in the relationship. |
boolean |
removeAgent(Agent pCTFAgent)
Removes the passed in agent from the list of members of this relationship. |
void |
setClassName(java.lang.String pClassName)
Sets the class name of this relationship |
void |
setIDNumber(int pID)
Sets the ID number of this relationship |
java.lang.String |
toString()
Returns a formated description of this relationship suitable for printing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int maxMembers
public int minMembers
| Constructor Detail |
public RelationshipRedSquad()
| Method Detail |
public boolean conditionsMet(Agent pCTFAgent,
java.util.Vector sensedAgents)
conditionsMet in interface RelationshippCTFAgent - The agent attempting to form the relationshipsensedAgents - A vector containing all of the sensed agents
public boolean conditionsMaintained()
conditionsMaintained in interface Relationshippublic void destroyRelationship()
destroyRelationship in interface Relationshippublic void issueRoles()
issueRoles in interface Relationshippublic boolean addAgent(Agent pCTFAgent)
addAgent in interface RelationshippCTFAgent - The agent to be added to this relationship.
public boolean removeAgent(Agent pCTFAgent)
removeAgent in interface RelationshippCTFAgent - The agent to be removed from this relationship.
public int getIDNumber()
getIDNumber in interface Relationshippublic void setIDNumber(int pID)
setIDNumber in interface RelationshippID - The new ID numberpublic void setClassName(java.lang.String pClassName)
setClassName in interface RelationshippClassName - The new class namepublic java.lang.String getClassName()
getClassName in interface Relationshippublic java.util.Vector getMembers()
getMembers in interface Relationshippublic java.lang.String toString()
toString in interface Relationship
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||