bdi4jade.core

## Interface MetadataElement

- All Known Subinterfaces:
    Belief<K,V>, BeliefSet<K,V>, Plan, Predicate<K>
  All Known Implementing Classes:
    AbstractBelief, AbstractBeliefSet, AbstractPlan, DefaultPlan, DerivedBelief, DerivedPredicate, MetadataElementImpl, NamedSoftgoal, PersistentBelief, TransientBelief, TransientBeliefSet, TransientPredicate

      public interface MetadataElement

  This interface defines methods that a certain element should implement to store metadata. Such metadata may be used in reasoning processes.
  Author:
    Ingrid Nunes

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<?,?>` | `getMetadata()`
    `java.lang.Object` | `getMetadata(java.lang.Object name)` Gets a value of a metadata.
    `boolean` | `hasMetadata(java.lang.Object name)` Verifies if a metadata is associated with this element.
    `void` | `putMetadata(java.lang.Object name, java.lang.Object value)` Put a metadata in this element.
    `java.lang.Object` | `removeMetadata(java.lang.Object name)` Removes a metadata of this element.

- - ### Method Detail

    - #### getMetadata

          java.util.Map<?,?> getMetadata()

      Returns:
        the metadata

    - #### getMetadata

          java.lang.Object getMetadata(java.lang.Object name)

      Gets a value of a metadata.
      Parameters:
        `name` - the name of the metadata.
      Returns:
        the existing value of this metadata.

    - #### hasMetadata

          boolean hasMetadata(java.lang.Object name)

      Verifies if a metadata is associated with this element.
      Parameters:
        `name` - the name of the metadata.
      Returns:
        true if the element has this metadata.

    - #### putMetadata

          void putMetadata(java.lang.Object name,
                           java.lang.Object value)

      Put a metadata in this element. If it does not exists, it is added, and it is update otherwise.
      Parameters:
        `name` - the name of the metadata.
        `value` - the value associated with this metadata.

    - #### removeMetadata

          java.lang.Object removeMetadata(java.lang.Object name)

      Removes a metadata of this element.
      Parameters:
        `name` - the name of the metadata.
      Returns:
        the existing value of this metadata.