public class RoleMultiple extends Object implements Serializable
sendTo
function of the sending agent.
The class does not handle duplicates in the list.Modifier and Type | Field and Description |
---|---|
private Vector<AgentId> |
list |
private String |
name |
private static long |
serialVersionUID
Define serialVersionUID for interoperability.
|
Constructor and Description |
---|
RoleMultiple() |
RoleMultiple(String name)
Creates a new RoleMultiple with a specified name.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(AgentId target)
Adds an agent in the listeners list.
|
boolean |
contains(AgentId id)
Tests if the specified agent id belongs to
role multiple.
|
Enumeration<AgentId> |
getListeners()
Gets the listeners list as an
Enumeration of AgentId objects. |
String |
getName()
Returns the role name.
|
void |
removeListener(AgentId target)
Removes an agent from the listeners list.
|
void |
setName(String name)
Sets the role name.
|
String |
toString()
Provides a string image for this object.
|
private static final long serialVersionUID
private String name
public RoleMultiple()
public RoleMultiple(String name)
name
- the role name.public void addListener(AgentId target)
public void removeListener(AgentId target)
public Enumeration<AgentId> getListeners()
Enumeration
of AgentId
objects.
There is no synchronization as we assume this object is manipulated
from the enclosing agent reaction.public String getName()
public void setName(String name)
name
- the role name.public boolean contains(AgentId id)
id
- the specified agent id.Copyright © 2018 ScalAgent D.T.. All Rights Reserved.