bdi4jade.goal

## Class BeliefPresentGoal<K>

- java.lang.Object
- - bdi4jade.goal.AbstractBeliefGoal<K>
  - - bdi4jade.goal.BeliefPresentGoal<K>

- All Implemented Interfaces:
    BeliefGoal<K>, Goal, jade.content.Concept, jade.content.ContentElement, jade.content.Term, java.io.Serializable

      public class BeliefPresentGoal<K>
      extends AbstractBeliefGoal<K>

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

- - ### Field Summary

    - ### Fields inherited from class bdi4jade.goal.AbstractBeliefGoal

      `beliefName, outputBelief`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BeliefPresentGoal()` Default constructor.
    `BeliefPresentGoal(K beliefName)` Creates a new BeliefPresentGoal with the provided belief name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `hashCode()`
    `boolean` | `isAchieved(BeliefBase beliefBase)` Checks whether this goal is achieved by verifying if the provided belief base contains the belief of this goal.
    `java.lang.String` | `toString()` Returns a string representation of this goal, in the form "BeliefGoal: belief name".

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

      `getBeliefName, getOutputBelief, setBeliefName, setOutputBelief`

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

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

- - ### Constructor Detail

    - #### BeliefPresentGoal

          public BeliefPresentGoal()

      Default constructor.

    - #### BeliefPresentGoal

          public BeliefPresentGoal(K beliefName)

      Creates a new BeliefPresentGoal with the provided belief name.
      Parameters:
        `beliefName` - the belief name.

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `AbstractBeliefGoal<K>`
      See Also:
        `Object.equals(java.lang.Object)`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `AbstractBeliefGoal<K>`
      See Also:
        `Object.hashCode()`

    - #### isAchieved

          public boolean isAchieved(BeliefBase beliefBase)

      Checks whether 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.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this goal, in the form "BeliefGoal: belief name".
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the string representation of this belief goal.
      See Also:
        `Object.toString()`