Class RBeliefbase

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​IBelief> beliefs
      The beliefs.
      protected java.util.Map<java.lang.String,​IBeliefSet> beliefsets
      The belief sets.
      protected java.lang.String[] names
      The local belief names (cached on first access).
      protected java.lang.String[] setnames
      The local belief set names (cached on first access).
      • Fields inherited from class jadex.bdiv3.runtime.impl.RElement

        agent, cnt, id, modelelement
    • Field Detail

      • beliefs

        protected java.util.Map<java.lang.String,​IBelief> beliefs
        The beliefs.
      • beliefsets

        protected java.util.Map<java.lang.String,​IBeliefSet> beliefsets
        The belief sets.
      • names

        protected java.lang.String[] names
        The local belief names (cached on first access).
      • setnames

        protected java.lang.String[] setnames
        The local belief set names (cached on first access).
    • Constructor Detail

      • RBeliefbase

        public RBeliefbase​(IInternalAccess agent)
        Create a new beliefbase.
    • Method Detail

      • init

        public void init()
        Init the beliefbase.
      • getBelief0

        public IBelief getBelief0​(java.lang.String name)
        Get a belief for a name.
        Parameters:
        name - The belief name.
      • getBeliefSet0

        public IBeliefSet getBeliefSet0​(java.lang.String name)
        Get a belief set for a name.
        Parameters:
        name - The belief set name.
      • getBelief

        public IBelief getBelief​(java.lang.String name)
        Get a belief for a name.
        Specified by:
        getBelief in interface IBeliefbase
        Parameters:
        name - The belief name.
      • getBeliefSet

        public IBeliefSet getBeliefSet​(java.lang.String name)
        Get a belief set for a name.
        Specified by:
        getBeliefSet in interface IBeliefbase
        Parameters:
        name - The belief set name.
      • containsBelief

        public boolean containsBelief​(java.lang.String name)
        Returns
        Specified by:
        containsBelief in interface IBeliefbase
        Parameters:
        name - the name of a belief.
        Returns:
        true if contained, false is not contained, or the specified name refer to a belief set.
        See Also:
        containsBeliefSet(java.lang.String)
      • containsBeliefSet

        public boolean containsBeliefSet​(java.lang.String name)
        Returns
        Specified by:
        containsBeliefSet in interface IBeliefbase
        Parameters:
        name - the name of a belief set.
        Returns:
        true if contained, false is not contained, or the specified name refer to a belief.
        See Also:
        containsBelief(java.lang.String)
      • getBeliefNames

        public java.lang.String[] getBeliefNames()
        Returns the names of all beliefs.
        Specified by:
        getBeliefNames in interface IBeliefbase
        Returns:
        the names of all beliefs.
      • getBeliefSetNames

        public java.lang.String[] getBeliefSetNames()
        Returns the names of all belief sets.
        Specified by:
        getBeliefSetNames in interface IBeliefbase
        Returns:
        the names of all belief sets.
      • addBelief

        public void addBelief​(RBeliefbase.RBelief bel)
        Add a belief.
        Parameters:
        bel - The belief.
      • addBeliefSet

        public void addBeliefSet​(RBeliefbase.RBeliefSet belset)
        Add a beliefset.
        Parameters:
        bel - The beliefset.
      • get

        public java.lang.Object get​(java.lang.Object key)
        Get an object from the map.
        Specified by:
        get in interface IMapAccess
        Parameters:
        key - The key
        Returns:
        The value.