bdi4jade.belief

## Interface Belief<T>

- Type Parameters:
    `T` - the type of the belief value.
  All Superinterfaces:
    jade.content.Concept, MetadataElement, java.io.Serializable, jade.content.Term
  All Known Subinterfaces:
    BeliefSet<T>
  All Known Implementing Classes:
    AbstractBelief, AbstractBeliefSet, PersistentBelief, SoftgoalPreferences, TransientBelief, TransientBeliefSet

      public interface Belief<T>
      extends MetadataElement, java.io.Serializable, jade.content.Concept

  This interface represents a belief of the belief base. It has a name and a value associate with it. It is parameterized by the type of the belief value. It extends the `MetadataElement` interface, allowing to associate metadata with beliefs.
  Author:
    Ingrid Nunes

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBeliefBase(BeliefBase beliefBase)` Adds a belief base that contains this belief.
    `java.util.Set<BeliefBase>` | `getBeliefBases()` Returns the belief bases with which this belief is associated.
    `java.lang.String` | `getName()` Returns the name of this belief.
    `T` | `getValue()` Gets the current value of the belief.
    `void` | `removeBeliefBase(BeliefBase beliefBase)` Removes a belief base that does not contain this belief anymore.
    `void` | `setValue(T value)` Sets the new value of the belief.

    - ### Methods inherited from interface bdi4jade.core.MetadataElement

      `getMetadata, getMetadata, hasMetadata, putMetadata, removeMetadata`

- - ### Method Detail

    - #### addBeliefBase

          void addBeliefBase(BeliefBase beliefBase)

      Adds a belief base that contains this belief. The agent whose capability contains this belief in the belief base believes in this belief.
      Parameters:
        `beliefBase` - the belief base to be added.

    - #### getBeliefBases

          java.util.Set<BeliefBase> getBeliefBases()

      Returns the belief bases with which this belief is associated.
      Returns:
        the belief bases.

    - #### getName

          java.lang.String getName()

      Returns the name of this belief.
      Returns:
        the string that is the belief name.

    - #### getValue

          T getValue()

      Gets the current value of the belief.
      Returns:
        the belief value.

    - #### removeBeliefBase

          void removeBeliefBase(BeliefBase beliefBase)

      Removes a belief base that does not contain this belief anymore. The agent whose capability does not contain this belief in the belief base does not believe in this belief anymore.
      Parameters:
        `beliefBase` - the belief base to be removed.

    - #### setValue

          void setValue(T value)

      Sets the new value of the belief.
      Parameters:
        `value` - the new value.