br.pucrio.inf.les.bdijade.goal
Class BeliefGoal

java.lang.Object
  extended by br.pucrio.inf.les.bdijade.goal.BeliefGoal
All Implemented Interfaces:
Goal, jade.content.Concept, jade.content.ContentElement, jade.content.Term, java.io.Serializable

public class BeliefGoal
extends java.lang.Object
implements Goal

This class represents the goal of an agent believe in a certain belief, i.e. the agent has a belief whose name is specified in this goal.

Author:
ingrid
See Also:
Serialized Form

Field Summary
private  java.lang.String beliefName
           
private static long serialVersionUID
           
 
Constructor Summary
BeliefGoal(java.lang.Object beliefValue)
          Creates a new BeliefGoal.
BeliefGoal(java.lang.String beliefName)
          Creates a new BeliefGoal with the provided belief name.
 
Method Summary
 java.lang.String getBeliefName()
           
 boolean isAchieved(BeliefBase beliefBase)
          Checks if this goal is achieved by verifying if the provided belief base contains the belief of this goal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

beliefName

private java.lang.String beliefName
Constructor Detail

BeliefGoal

public BeliefGoal(java.lang.Object beliefValue)
Creates a new BeliefGoal. It considers that the belief name is string returned from the toString() method of the beliefValue.

Parameters:
beliefValue - the belief value whose toString() is the belief name.

BeliefGoal

public BeliefGoal(java.lang.String beliefName)
Creates a new BeliefGoal with the provided belief name.

Parameters:
beliefName - the belief name.
Method Detail

getBeliefName

public java.lang.String getBeliefName()
Returns:
the beliefName

isAchieved

public boolean isAchieved(BeliefBase beliefBase)
Checks if this goal is achieved by verifying if the provided belief base contains the belief of this goal.

Parameters:
beliefBase - the belief base to be checked.
Returns:
true if the belief base contains the belief of this goal.