bdi4jade.belief

## Class TransientBelief<T>

- java.lang.Object
- - bdi4jade.core.MetadataElementImpl
  - - bdi4jade.belief.AbstractBelief<T>
    - - bdi4jade.belief.TransientBelief<T>

- Type Parameters:
    `T` - the type of the belief value.
  All Implemented Interfaces:
    Belief<T>, MetadataElement, jade.content.Concept, jade.content.Term, java.io.Serializable
  Direct Known Subclasses:
    SoftgoalPreferences

      public class TransientBelief<T>
      extends AbstractBelief<T>

  This class extends the `AbstractBelief` class and represents a transient belief, which is not persisted in a permanent memory.
  Author:
    Ingrid Nunes
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected T` | `value`

    - ### Fields inherited from class bdi4jade.core.MetadataElementImpl

      `metadata`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TransientBelief()` The default constructor.
    `` | `TransientBelief(java.lang.String name)` Initializes a transient belief with its name.
    `` | `TransientBelief(java.lang.String name, T value)` Initializes a transient belief with its name and a initial value.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getValue()` Gets the current value of the belief.
    `protected void` | `updateValue(T value)` Sets the value of this belief.

    - ### Methods inherited from class bdi4jade.belief.AbstractBelief

      `addBeliefBase, equals, getBeliefBases, getName, hashCode, notifyBeliefBases, removeBeliefBase, setName, setValue, toString`

    - ### Methods inherited from class bdi4jade.core.MetadataElementImpl

      `getMetadata, getMetadata, hasMetadata, putMetadata, removeMetadata`

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

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

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

      `getMetadata, getMetadata, hasMetadata, putMetadata, removeMetadata`

- - ### Field Detail

    - #### value

          protected T value

  - ### Constructor Detail

    - #### TransientBelief

          protected TransientBelief()

      The default constructor. It should be only used if persistence frameworks are used.

    - #### TransientBelief

          public TransientBelief(java.lang.String name)

      Initializes a transient belief with its name.
      Parameters:
        `name` - the belief name.

    - #### TransientBelief

          public TransientBelief(java.lang.String name,
                         T value)

      Initializes a transient belief with its name and a initial value.
      Parameters:
        `name` - the belief name.
        `value` - the initial belief value.

  - ### Method Detail

    - #### getValue

          public T getValue()

      Description copied from interface: `Belief`
      Gets the current value of the belief.
      Returns:
        the belief value.
      See Also:
        `Belief.getValue()`

    - #### updateValue

          protected void updateValue(T value)

      Description copied from class: `AbstractBelief`
      Sets the value of this belief. It is invoked by the `AbstractBelief.setValue(Object)` method.
      Specified by:
        `updateValue` in class `AbstractBelief<T>`
      Parameters:
        `value` - the value to set.
      See Also:
        `AbstractBelief.updateValue(java.lang.Object)`