bdi4jade.util.goal

## Class BeliefGoal

- java.lang.Object
- - bdi4jade.util.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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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.