Class Organization
java.lang.Object
madkit.kernel.Organization
This class is responsible for managing the organization of the artificial society. It
is responsible for creating and removing communities, groups and roles.
-
Method Summary
Modifier and TypeMethodDescriptiongetAgentsWithRole
(String community, String group, String role) Returns aList
containing all other agents having this position in the organization.Returns a list of all the communities in the organizationReturns the group object corresponding to the given community and group namesReturns the role object corresponding to the given community, group and roleboolean
isCommunity
(String community) Returnstrue
if the community exists in the organization.boolean
Returnstrue
if the group exists in the organization.boolean
Returnstrue
if the role exists in the organization.void
removeCommunity
(String community)
-
Method Details
-
isGroup
-
isRole
-
getRole
public Role getRole(String community, String group, String role) throws madkit.kernel.CGRNotAvailable Returns the role object corresponding to the given community, group and role- Parameters:
community
- the community namegroup
- the group namerole
- the role name- Returns:
- the role object
- Throws:
madkit.kernel.CGRNotAvailable
-
getGroup
Returns the group object corresponding to the given community and group names- Parameters:
community
- the community namegroup
- the group name- Returns:
- the group object corresponding to the given community and group names
- Throws:
madkit.kernel.CGRNotAvailable
-
isCommunity
Returnstrue
if the community exists in the organization. A community exists if it has at least one agent playing a role in a group.- Parameters:
community
- the community name- Returns:
true
if the community exists
-
removeCommunity
- Parameters:
community
-
-
getCommunities
-
getAgentsWithRole
Returns aList
containing all other agents having this position in the organization. The caller is excluded from the search.- Parameters:
community
- the community namegroup
- the group namerole
- the role name- Returns:
- a list of agent addresses corresponding to agents having the given role
-