|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjadex.application.space.agr.Group
public class Group
An AGR group hold information about agent instances and their positions (i.e. role instances).
| Field Summary | |
|---|---|
protected String |
name
The group name. |
protected Map |
positions
The positions (role name -> Set{aids}). |
protected Map |
roles
The roles (agent type name -> Set{role names}). |
| Constructor Summary | |
|---|---|
Group(String name)
Create a new group. |
|
| Method Summary | |
|---|---|
void |
addRoleForType(String typename,
String rolename)
Add a role name for an agent type name. |
void |
assignRole(IComponentIdentifier aid,
String rolename)
Assign an agent to a role. |
IComponentIdentifier[] |
getAgentsForRole(String rolename)
Get the agents with a given role. |
String |
getName()
Get the name of the group. |
String[] |
getRolesForType(String typename)
Get the role names for an agent type name. |
void |
removeRoleForType(String typename,
String rolename)
Remove a role name for an agent type name. |
void |
unassignRole(IComponentIdentifier aid,
String rolename)
Remove an agent from a role. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected Map positions
protected Map roles
| Constructor Detail |
|---|
public Group(String name)
type - The group type.| Method Detail |
|---|
public String getName()
public void addRoleForType(String typename,
String rolename)
typename - The agent type name.rolename - The role name.
public void removeRoleForType(String typename,
String rolename)
typename - The agent type name.rolename - The role name.public String[] getRolesForType(String typename)
typename - The agent type name.
public void assignRole(IComponentIdentifier aid,
String rolename)
aid - The agent id.rolename - The role name.
public void unassignRole(IComponentIdentifier aid,
String rolename)
aid - The agent id.rolename - The role name.public IComponentIdentifier[] getAgentsForRole(String rolename)
rolename - The role name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||