bdi4jade.goal

## Class AbstractBeliefGoal<K>

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

- All Implemented Interfaces:
    BeliefGoal<K>, Goal, jade.content.Concept, jade.content.ContentElement, jade.content.Term, java.io.Serializable
  Direct Known Subclasses:
    BeliefNotNullValueGoal, BeliefNotPresentGoal, BeliefPresentGoal, BeliefSetHasValueGoal, BeliefValueGoal

      public abstract class AbstractBeliefGoal<K>
      extends java.lang.Object
      implements BeliefGoal<K>

  This is an abstract implementation of a belief goal.
  Author:
    Ingrid Nunes
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected K` | `beliefName`
    `protected Belief<K,?>` | `outputBelief`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `K` | `getBeliefName()` Returns the name of the belief associated with this goal.
    `Belief<K,?>` | `getOutputBelief()` Returns the belief which is the output of this goal achievement.
    `int` | `hashCode()`
    `void` | `setBeliefName(K beliefName)` Sets the name of the belief associated with this goal.
    `void` | `setOutputBelief(Belief<K,?> belief)` Sets the belief which is the output of this goal achievement.

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

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

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

      `isAchieved`

- - ### Field Detail

    - #### beliefName

          protected K beliefName

    - #### outputBelief

          protected Belief<K,?> outputBelief

  - ### Constructor Detail

    - #### AbstractBeliefGoal

          public AbstractBeliefGoal()

      Default constructor.

    - #### AbstractBeliefGoal

          public AbstractBeliefGoal(K beliefName)

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

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`
      See Also:
        `Object.equals(java.lang.Object)`

    - #### getBeliefName

          @Parameter(direction=IN)
          public K getBeliefName()

      Returns the name of the belief associated with this goal.
      Specified by:
        `getBeliefName` in interface `BeliefGoal<K>`
      Returns:
        the belief name.

    - #### getOutputBelief

          @Parameter(direction=OUT)
          public Belief<K,?> getOutputBelief()

      Returns the belief which is the output of this goal achievement.
      Specified by:
        `getOutputBelief` in interface `BeliefGoal<K>`
      Returns:
        the belief.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`
      See Also:
        `Object.hashCode()`

    - #### setBeliefName

          public void setBeliefName(K beliefName)

      Sets the name of the belief associated with this goal.
      Parameters:
        `beliefName` - the belief name.

    - #### setOutputBelief

          public void setOutputBelief(Belief<K,?> belief)

      Sets the belief which is the output of this goal achievement.
      Specified by:
        `setOutputBelief` in interface `BeliefGoal<K>`
      Parameters:
        `belief` - the belief.