Class Group
java.lang.Object
madkit.kernel.Group
This class represents a group, containing roles played by agents. It is a collection of
roles. A group is always linked to a community.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the agent is in this group.boolean
exists()
Checks if the group actually exists.Gets the community this group belongs to.Gets the organization of the community this group belongs to.Gets a role as an object from its nameGets the names of the roles in this group.getRoles()
Gets the list of the roles in this group.boolean
Checks if is distributed.Roles of the agent in this group.int
size()
Returns the number of roles in this group.toString()
Returns a string representation of the group.
-
Method Details
-
getOrganization
Gets the organization of the community this group belongs to.- Returns:
- the parentOrganization
-
getCommunity
Gets the community this group belongs to.- Returns:
- the communityObject
-
getRoles
-
getRole
-
contains
Checks if the agent is in this group.- Parameters:
agent
- the agent to check- Returns:
true
, if the agent is in this group
-
getRoleNames
-
isDistributed
public boolean isDistributed()Checks if is distributed.- Returns:
- true, if is distributed
-
rolesOf
-
toString
-
size
public int size()Returns the number of roles in this group.- Returns:
- the number of roles in this group
-
exists
public boolean exists()Checks if the group actually exists.- Returns:
true
, if the group exists
-