Package moise.oe

Class 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
    • Method Detail

      • getRole

        public Role getRole()
      • getLinks

        public java.util.Collection<Link> getLinks​(java.lang.String type)
        gives all links of type type (e.g. "communication") that this role player has. if type is null, all links are given
      • getObligations

        public java.util.Collection<Permission> 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

        public java.util.Collection<Permission> 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Player
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Player
      • getXMLTag

        public static java.lang.String getXMLTag()
      • getAsDOM

        public org.w3c.dom.Element getAsDOM​(org.w3c.dom.Document document)
        Specified by:
        getAsDOM in interface ToXML
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object