bdi4jade.goal

## Class BeliefSetValueGoal<T>

- java.lang.Object
- - bdi4jade.goal.BeliefGoal
  - - bdi4jade.goal.BeliefValueGoal<T>
    - - bdi4jade.goal.BeliefSetValueGoal<T>

- Type Parameters:
    `T` - the type of the values in the belief set.
  All Implemented Interfaces:
    Goal, jade.content.Concept, jade.content.ContentElement, jade.content.Term, java.io.Serializable

      public class BeliefSetValueGoal<T>
      extends BeliefValueGoal<T>

  This class represents the goal of an agent believe in a belief that contains a certain value, that is, the agent has a belief set whose name is specified in this goal and it contains the specified value.
  Author:
    Ingrid Nunes
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BeliefSetValueGoal(java.lang.String beliefSetName, T value)` Creates a new BeliefSetValueGoal with the provided belief name and a value.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isAchieved(BeliefBase beliefBase)` Checks whether this goal is achieved by verifying if the provided belief set contains the value specified in this goal.
    `java.lang.String` | `toString()` Returns a string representation of this goal, in the form "BeliefSetValueGoal: BELIEF NAME should have BELIEF VALUE".

    - ### Methods inherited from class bdi4jade.goal.BeliefValueGoal

      `getValue`

    - ### Methods inherited from class bdi4jade.goal.BeliefGoal

      `getBeliefName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

    - #### isAchieved

          public boolean isAchieved(BeliefBase beliefBase)

      Checks whether this goal is achieved by verifying if the provided belief set contains the value specified in this goal.
      Overrides:
        `isAchieved` in class `BeliefValueGoal<T>`
      Parameters:
        `beliefBase` - the belief base to be checked.
      Returns:
        true if the belief set contains the value specified in this goal.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this goal, in the form "BeliefSetValueGoal: BELIEF NAME should have BELIEF VALUE".
      Overrides:
        `toString` in class `BeliefValueGoal<T>`
      Returns:
        the string representation of this belief value goal.
      See Also:
        `Object.toString()`