lij.runtime
Class SpecialConstraints
java.lang.Object
lij.runtime.SpecialConstraints
public class SpecialConstraints
- extends java.lang.Object
This class provides a number of special constraint methods that can be used
to interface with the interpreter runtime.
- Author:
- Nikolaos Chatzinikolaou
Method Summary |
boolean |
_findPeers(Accessor role,
Accessor list)
Generates and returns (via the provided Accessor) a list of all the IDs
of the agents that match the specified role. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
interpreter
private Interpreter interpreter
agentInstance
private AgentInstance agentInstance
SpecialConstraints
public SpecialConstraints(Interpreter _interpreter,
AgentInstance _agentInstance)
- Constructor.
- Parameters:
_interpreter
- A reference to the current interpreter runtime._agentInstance
- A reference to the current agent instance.
_findPeers
public boolean _findPeers(Accessor role,
Accessor list)
throws InterpreterException
- Generates and returns (via the provided Accessor) a list of all the IDs
of the agents that match the specified role.
- Parameters:
role
- The role to match.list
- Will contain the generated list of IDs
- Returns:
- True, if any agents matching the specified role were found.
- Throws:
InterpreterException