massim.framework
Class TeamAgentFilter

java.lang.Object
  extended by massim.framework.AbstractAgentFilter
      extended by massim.framework.TeamAgentFilter
All Implemented Interfaces:
AgentProvider

public class TeamAgentFilter
extends AbstractAgentFilter

This class allows filtering agents that do not belong to a certain team, based upon a map which agent belongs to which team.


Constructor Summary
TeamAgentFilter(java.util.Map<Account,java.lang.Object> teammap, AgentProvider agentprovider)
          Construct a new TeamAgentFilter.
 
Method Summary
 boolean isSuitable(UniqueSimulationAgent a, AgentParameter p)
          This method determines if an agent suits the requirements found in agent parameters p.
 
Methods inherited from class massim.framework.AbstractAgentFilter
allocateAgent, freeAgent, getAgents, getBase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeamAgentFilter

public TeamAgentFilter(java.util.Map<Account,java.lang.Object> teammap,
                       AgentProvider agentprovider)
Construct a new TeamAgentFilter.

Parameters:
teammap - association map to use
agentprovider - agent provider to receive agents from
Method Detail

isSuitable

public boolean isSuitable(UniqueSimulationAgent a,
                          AgentParameter p)
Description copied from class: AbstractAgentFilter
This method determines if an agent suits the requirements found in agent parameters p.

Specified by:
isSuitable in class AbstractAgentFilter
Parameters:
a - agent candidate
p - agent requirements.
Returns:
true iff a suits p.


Copyright © 2012. All Rights Reserved.