Package moise.oe
Class RolePlayer
java.lang.Object
moise.oe.Player
moise.oe.RolePlayer
- All Implemented Interfaces:
java.io.Serializable,ToXML
public class RolePlayer extends Player implements ToXML
Represents the Role that an agent is playing in a group.
- Author:
- Jomi Fred Hubner
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private GroupInstancegrprivate Roleroleprivate static longserialVersionUID -
Constructor Summary
Constructors Modifier Constructor Description protectedRolePlayer(Role role, OEAgent ag, GroupInstance gr) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)org.w3c.dom.ElementgetAsDOM(org.w3c.dom.Document document)GroupInstancegetGroup()java.util.Collection<Link>getLinks(java.lang.String type)gives all links of typetype(e.g.private java.util.Collection<Permission>getNorms(NS.OpTypes type)java.util.Collection<Permission>getObligations()returns a collection of missions this role player is obliged to commit to.java.util.Collection<Permission>getPermissions()returns a collection of missions where this role player is permitted to commit to.RolegetRole()static java.lang.StringgetXMLTag()inthashCode()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
role
-
gr
-
-
Constructor Details
-
RolePlayer
- Throws:
MoiseConsistencyException
-
-
Method Details
-
getRole
-
getGroup
-
getLinks
gives all links of typetype(e.g. "communication") that this role player has. if type is null, all links are given -
getObligations
returns a collection of missions this role player is obliged to commit to. each element in the returned collection is an Permission Object where: getRolePlayer() is the RolePlayer (rp), in this case "this" role player; getMission() is the Mission (m); and getScheme() is the Scheme instance (sch) where the rp is obligated to commit to m. -
getPermissions
returns a collection of missions where this role player is permitted to commit to. each element in the returned collection is a Permission Object where: getRolePlayer() is the RolePlayer (rp), in this case "this" role player; getMission() is the Mission (m); and getScheme() is the Scheme instance (sch) where the rp is obligated to commit to m. -
getNorms
-
hashCode
public int hashCode() -
equals
public boolean equals(java.lang.Object obj) -
getXMLTag
public static java.lang.String getXMLTag() -
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document) -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-