bdi4jade.belief

## Class BeliefSet<T>

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

- All Implemented Interfaces:
    jade.content.Concept, jade.content.Term, java.io.Serializable
  Direct Known Subclasses:
    TransientBeliefSet

      public abstract class BeliefSet<T>
      extends Belief<java.util.Set<T>>

  This class represents a belief that has a set of values associated with it.
  Author:
    ingrid
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BeliefSet(java.lang.String name)` Creates a new belief set with the provided name.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `addValue(T value)` Adds a new value to this belief set.
    `abstract boolean` | `hasValue(T value)` Checks if this belief set has the provided value.
    `abstract java.util.Iterator<T>` | `iterator()` Returns an iterator for this belief set.
    `abstract boolean` | `removeValue(T value)` Removes a value from this belief set.

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

      `addBeliefBase, equals, getBeliefBases, getName, getValue, hashCode, removeBeliefBase, setValue, toString`

    - ### 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

    - #### BeliefSet

          public BeliefSet(java.lang.String name)

      Creates a new belief set with the provided name.
      Parameters:
        `name` - the name of this belief set.

  - ### Method Detail

    - #### addValue

          public abstract void addValue(T value)

      Adds a new value to this belief set.
      Parameters:
        `value` - the value to be added.

    - #### hasValue

          public abstract boolean hasValue(T value)

      Checks if this belief set has the provided value.
      Parameters:
        `value` - the value to be tested.
      Returns:
        true if the belief set contains this value.

    - #### iterator

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

      Returns an iterator for this belief set.
      Returns:
        the iterator.

    - #### removeValue

          public abstract boolean removeValue(T value)

      Removes a value from this belief set.
      Parameters:
        `value` - the value to be removed.
      Returns:
        true if the value was removed.