fr.lifl.jedi.util
Class AgentsPopulation

java.lang.Object
  extended by fr.lifl.jedi.util.AgentsPopulation

public class AgentsPopulation
extends java.lang.Object

This class stores the total population of all different agent classes within the environment.

Version:
JEDI V 2.2
Created the 16th march 2009
Modified the 5th may 2009
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Constructor Summary
AgentsPopulation()
          Empty construction of an AgentsPopulation Object.
 
Method Summary
 void clear()
          Clears the data of this object.
 void decrementPopulation(java.lang.Class<? extends Agent> family)
          This method decrements the population of a concrete agent family.
 int getPopulation(java.lang.Class<? extends Agent> family)
          Gets the total population of a particular agent family in the environment.
 java.lang.Class<? extends Agent> getRootAgentClass()
          Gets the root class of all agent families.
 java.util.List<java.lang.Class<? extends Agent>> getSubFamiliesOf(java.lang.Class<? extends Agent> family)
          Gets the set of all agent families inheriting directly from the agent family in parameters.
 void incrementPopulation(java.lang.Class<? extends Agent> family)
          This method increments the population of a concrete agent family.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentsPopulation

public AgentsPopulation()
Empty construction of an AgentsPopulation Object.

Method Detail

incrementPopulation

public void incrementPopulation(java.lang.Class<? extends Agent> family)
This method increments the population of a concrete agent family.

Parameters:
family - the family for which the population increments.

decrementPopulation

public void decrementPopulation(java.lang.Class<? extends Agent> family)
This method decrements the population of a concrete agent family.

Parameters:
family - the family for which the population decrements.

getPopulation

public int getPopulation(java.lang.Class<? extends Agent> family)
Gets the total population of a particular agent family in the environment.

Parameters:
family - the family for which the population is retrieved.
Returns:
the population of the agent family in parameters.

getSubFamiliesOf

public java.util.List<java.lang.Class<? extends Agent>> getSubFamiliesOf(java.lang.Class<? extends Agent> family)
Gets the set of all agent families inheriting directly from the agent family in parameters.

Parameters:
family - the agent family from which direct subfamilies have to be retrieved.
Returns:
the set of all direct subfamilies that inherit from the parameter.

getRootAgentClass

public java.lang.Class<? extends Agent> getRootAgentClass()
Gets the root class of all agent families.

Returns:
the root class of all agent families.

clear

public void clear()
Clears the data of this object.