|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdemo.helicopter.RelationshipBlueSquad
Blue 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 | |
RelationshipBlueSquad()
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 RelationshipBlueSquad()
Method Detail |
public boolean conditionsMet(Agent pCTFAgent, java.util.Vector sensedAgents)
conditionsMet
in interface Relationship
pCTFAgent
- The agent attempting to form the relationshipsensedAgents
- A vector containing all of the sensed agents
public boolean conditionsMaintained()
conditionsMaintained
in interface Relationship
public void destroyRelationship()
destroyRelationship
in interface Relationship
public void issueRoles()
issueRoles
in interface Relationship
public boolean addAgent(Agent pCTFAgent)
addAgent
in interface Relationship
pCTFAgent
- The agent to be added to this relationship.
public boolean removeAgent(Agent pCTFAgent)
removeAgent
in interface Relationship
pCTFAgent
- The agent to be removed from this relationship.
public int getIDNumber()
getIDNumber
in interface Relationship
public void setIDNumber(int pID)
setIDNumber
in interface Relationship
pID
- The new ID numberpublic void setClassName(java.lang.String pClassName)
setClassName
in interface Relationship
pClassName
- The new class namepublic java.lang.String getClassName()
getClassName
in interface Relationship
public java.util.Vector getMembers()
getMembers
in interface Relationship
public java.lang.String toString()
toString
in interface Relationship
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |