Class BeliefbaseWrapper

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IBeliefbase beliefbase
      The flat belief base.
      protected java.lang.String[] names
      The local belief names (cached on first access).
      protected java.lang.String prefix
      The full capability prefix.
      protected java.lang.String[] setnames
      The local belief set names (cached on first access).
    • Constructor Summary

      Constructors 
      Constructor Description
      BeliefbaseWrapper​(IBeliefbase beliefbase, java.lang.String prefix)
      Create a belief base wrapper.
    • Field Detail

      • beliefbase

        protected IBeliefbase beliefbase
        The flat belief base.
      • prefix

        protected java.lang.String prefix
        The full capability prefix.
      • 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

      • BeliefbaseWrapper

        public BeliefbaseWrapper​(IBeliefbase beliefbase,
                                 java.lang.String prefix)
        Create a belief base wrapper.
    • Method Detail

      • get

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

        public MElement getModelElement()
        Get the model element.
        Specified by:
        getModelElement in interface IElement
        Returns:
        The model element.
      • 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.