bdi4jade.belief

## Class TransientBeliefSet<T>

- java.lang.Object
- - bdi4jade.util.MetadataElement
  - - bdi4jade.belief.Belief<java.util.Set<T>>
    - - bdi4jade.belief.BeliefSet<T>
      - - bdi4jade.belief.TransientBeliefSet<T>

- All Implemented Interfaces:
    jade.content.Concept, jade.content.Term, java.io.Serializable

      public class TransientBeliefSet<T>
      extends BeliefSet<T>

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransientBeliefSet(java.lang.String name)` Creates a transient belief set.
    `TransientBeliefSet(java.lang.String name, java.util.Set<T> values)` Creates a transient belief set.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addValue(T value)` Adds a new value to this belief set.
    `java.util.Set<T>` | `getValue()` Gets the current value of the Belief.
    `boolean` | `hasValue(T value)` Checks if this belief set has the provided value.
    `java.util.Iterator<T>` | `iterator()` Returns an iterator for this belief set.
    `boolean` | `removeValue(T value)` Removes a value from this belief set.
    `void` | `setValue(java.util.Set<T> values)` Sets a new value to the belief.
    `java.lang.String` | `toString()`

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

      `addBeliefBase, equals, getBeliefBases, getName, hashCode, removeBeliefBase`

    - ### Methods inherited from class bdi4jade.util.MetadataElement

      `getMetadata, getMetadata, hasMetadata, putMetadata, removeMetadata`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TransientBeliefSet

          public TransientBeliefSet(java.lang.String name)

      Creates a transient belief set.
      Parameters:
        `name` - the name of the belief set.

    - #### TransientBeliefSet

          public TransientBeliefSet(java.lang.String name,
                            java.util.Set<T> values)

      Creates a transient belief set.
      Parameters:
        `name` - the name of the belief set.
        `values` - the initial values of this belief set.

  - ### Method Detail

    - #### addValue

          public void addValue(T value)

      Description copied from class: `BeliefSet`
      Adds a new value to this belief set.
      Specified by:
        `addValue` in class `BeliefSet<T>`
      Parameters:
        `value` - the value to be added.
      See Also:
        `BeliefSet.addValue(java.lang.Object)`

    - #### getValue

          public java.util.Set<T> getValue()

      Description copied from class: `Belief`
      Gets the current value of the Belief.
      Specified by:
        `getValue` in class `Belief<java.util.Set<T>>`
      Returns:
        the belief value.
      See Also:
        `Belief.getValue()`

    - #### hasValue

          public boolean hasValue(T value)

      Description copied from class: `BeliefSet`
      Checks if this belief set has the provided value.
      Specified by:
        `hasValue` in class `BeliefSet<T>`
      Parameters:
        `value` - the value to be tested.
      Returns:
        true if the belief set contains this value.
      See Also:
        `BeliefSet.hasValue(java.lang.Object)`

    - #### iterator

          public java.util.Iterator<T> iterator()

      Description copied from class: `BeliefSet`
      Returns an iterator for this belief set.
      Specified by:
        `iterator` in class `BeliefSet<T>`
      Returns:
        the iterator.
      See Also:
        `BeliefSet.iterator()`

    - #### removeValue

          public boolean removeValue(T value)

      Description copied from class: `BeliefSet`
      Removes a value from this belief set.
      Specified by:
        `removeValue` in class `BeliefSet<T>`
      Parameters:
        `value` - the value to be removed.
      Returns:
        true if the value was removed.
      See Also:
        `BeliefSet.removeValue(java.lang.Object)`

    - #### setValue

          public void setValue(java.util.Set<T> values)

      Description copied from class: `Belief`
      Sets a new value to the belief.
      Specified by:
        `setValue` in class `Belief<java.util.Set<T>>`
      Parameters:
        `values` - the new value.
      See Also:
        `Belief.setValue(java.lang.Object)`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `Belief<java.util.Set<T>>`
      See Also:
        `Object.toString()`