bdi4jade.goal

## Class BeliefValueGoal<T>

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

- Type Parameters:
    `T` - the type of the belief value.
  All Implemented Interfaces:
    Goal, jade.content.Concept, jade.content.ContentElement, jade.content.Term, java.io.Serializable
  Direct Known Subclasses:
    BeliefSetValueGoal

      public class BeliefValueGoal<T>
      extends BeliefGoal

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

- - ### Constructor Summary

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

  - ### Method Summary

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

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

    - #### BeliefValueGoal

          public BeliefValueGoal(java.lang.String beliefName,
                         T value)

      Creates a new BeliefValueGoal with the provided belief name and a value. This value represents the value that is aimed to be associated with the belief.
      Parameters:
        `beliefName` - the belief name.
        `value` - the value that is target of this goal.

  - ### Method Detail

    - #### getValue

          public T getValue()

      The belief value associated with this goal.
      Returns:
        the belief value.

    - #### isAchieved

          public boolean isAchieved(BeliefBase beliefBase)

      Checks whether this goal is achieved by verifying if the provided belief has the value specified in this goal.
      Overrides:
        `isAchieved` in class `BeliefGoal`
      Parameters:
        `beliefBase` - the belief base to be checked.
      Returns:
        true if the belief has the value specified in this goal, false otherwise.

    - #### toString

          public java.lang.String toString()

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