br.pucrio.inf.les.bdijade.goal
Class BeliefSetValueGoal<T>

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

public class BeliefSetValueGoal<T>
extends java.lang.Object
implements Goal

This class represents the goal of an agent believe in a belief that contains a certain value, i.e. the agent has a belief set whose name is specified in this goal and it contains the specified value..

Author:
ingrid
See Also:
Serialized Form

Field Summary
private  java.lang.String beliefSetName
           
private static long serialVersionUID
           
private  T value
           
 
Constructor Summary
BeliefSetValueGoal(java.lang.String beliefSetName, T value)
          Creates a new BeliefSetValueGoal with the provided belief name and a value.
 
Method Summary
 java.lang.String getBeliefSetName()
           
 T getValue()
           
 boolean isAchieved(BeliefBase beliefBase)
          Checks if this goal is achieved by verifying if the provided belief set contains the Value of this goal.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

beliefSetName

private java.lang.String beliefSetName

value

private T value
Constructor Detail

BeliefSetValueGoal

public BeliefSetValueGoal(java.lang.String beliefSetName,
                          T value)
Creates a new BeliefSetValueGoal with the provided belief name and a value. This value represents the one that should be part of the belief set.

Parameters:
beliefSetName - the belief name.
value - the value that is target of this goal.
Method Detail

getBeliefSetName

public java.lang.String getBeliefSetName()
Returns:
the beliefSetName

getValue

public T getValue()
Returns:
the value

isAchieved

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

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()