galatea.glorias
Class Goals

java.lang.Object
  extended bygalatea.glorias.Goals

public class Goals
extends java.lang.Object

This class contains all the goals that an agent may perform.
-----
Esta clase almacena todas las metas que un agente podría llegar a ejecutar.

Version:
Juguete toytwo_1.
Author:
Jacinto Dávila y Niandry Moreno.

Field Summary
 java.lang.String[] allGoals
          Array that contains all the agent's goals.
 int intention
          Quantity of actions that an agent could perform (independently if the conditions to perform them are activated or not).
 
Constructor Summary
Goals()
          Constructor of the class.
 
Method Summary
 void activateGoal(Goal goal)
          This method adds a goal to the array that contains the set of agent goals.
 java.lang.String getForExecution(int i)
          This method takes out a determined goal from the set of agent's goals, to perform the action related to that goal.
 boolean isEmpty()
          This method initializes agent's goals to zero.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allGoals

public java.lang.String[] allGoals
Array that contains all the agent's goals.
-----
Esta variable es un arreglo que almacena todas las metas del agente.


intention

public int intention
Quantity of actions that an agent could perform (independently if the conditions to perform them are activated or not).
-----
Cantidad de acciones que un agente podría ejecutar (independientemente de si las condiciones para llevarlas a cabo están dadas o no).

Constructor Detail

Goals

public Goals()
Constructor of the class. It initializes an array of a hundred of elements (at this moment an agent could perform just 100 actions).
-----
Constructor de la clase. Por los momentos solamente es posible llevar a cabo 100 acciones, ya que se ha implemntado un arreglo que tiene capacidad para cien elementos.

Method Detail

activateGoal

public void activateGoal(Goal goal)
This method adds a goal to the array that contains the set of agent goals.
-----
Este método agrega una meta al conjunto total de metas del agente.

Parameters:
goal - Goal. It is the reference to a new agent goal.
-----
goal - Goal. Referencia a una nueva meta del agente.

getForExecution

public java.lang.String getForExecution(int i)
This method takes out a determined goal from the set of agent's goals, to perform the action related to that goal.
-----
Este método saca una determinada meta de la lista de metas del agente para poder llevar a cabo la acción relacionada a la meta a extraer.

Parameters:
i - int. It indicates the goal position number at the goals array.
-----
i - int. Indica la posición de la meta en el arreglo de metas del agente.
Returns:
temp String. It has the name of the goal that is gotten out.
-----
temp String. Variable contiene el nombre de la meta que ha sido extraída de la lista de metas del agente.

isEmpty

public boolean isEmpty()
This method initializes agent's goals to zero.
-----
Este método inicializa a cero las metas del agente.

Returns:
lastOne boolean. The quantity of agent's goals is zero.
-----
lastOne boolean. La cantidad de metas del agente es cero.