lij.runtime
Class SpecialConstraints

java.lang.Object
  extended by 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

Field Summary
private  AgentInstance agentInstance
           
private  Interpreter interpreter
           
 
Constructor Summary
SpecialConstraints(Interpreter _interpreter, AgentInstance _agentInstance)
          Constructor.
 
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
 

Field Detail

interpreter

private Interpreter interpreter

agentInstance

private AgentInstance agentInstance
Constructor Detail

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.
Method Detail

_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