Class Community
java.lang.Object
madkit.kernel.Community
This class represents a community within the MaDKit kernel. It is meant to be a
namespace for groups and roles, so that a specific AGR organization can be instantiated
within a community, and thus isolated from others, avoiding conflicts.
It provides methods to query which groups and roles are available in the community,
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
Checks if the community exists (i.e., has any groups).Returns the group with the specified name.Returns a list of all groups in the community.Returns the logger associated with the community.getName()
Returns the name of the community.void
removeAgent
(Agent agent) Removes the specified agent from all groups in the community.int
size()
Returns the number of groups in the community.
-
Method Details
-
getName
-
getLogger
Returns the logger associated with the community.- Returns:
- the logger associated with the community
-
getGroup
-
getGroups
-
removeAgent
Removes the specified agent from all groups in the community.- Parameters:
agent
- the agent to remove
-
size
public int size()Returns the number of groups in the community.- Returns:
- the number of groups in the community
-
exists
public boolean exists()Checks if the community exists (i.e., has any groups).- Returns:
- true if the community has any groups, false otherwise
-