Package jadex.bdiv3x.runtime
Class RBeliefbase
- java.lang.Object
- 
- jadex.bdiv3.runtime.impl.RElement
- 
- jadex.bdiv3x.runtime.RBeliefbase
 
 
- 
- All Implemented Interfaces:
- IBeliefbase,- IElement,- IMapAccess
 
 public class RBeliefbase extends jadex.bdiv3.runtime.impl.RElement implements IBeliefbase, IMapAccess Runtime element for storing beliefs.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classRBeliefbase.RBeliefDeprecated.classRBeliefbase.RBeliefSet
 - 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.String,IBelief>beliefsThe beliefs.protected java.util.Map<java.lang.String,IBeliefSet>beliefsetsThe belief sets.protected java.lang.String[]namesThe local belief names (cached on first access).protected java.lang.String[]setnamesThe local belief set names (cached on first access).
 - 
Constructor SummaryConstructors Constructor Description RBeliefbase(IInternalAccess agent)Create a new beliefbase.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBelief(RBeliefbase.RBelief bel)Add a belief.voidaddBeliefSet(RBeliefbase.RBeliefSet belset)Add a beliefset.booleancontainsBelief(java.lang.String name)ReturnsbooleancontainsBeliefSet(java.lang.String name)Returnsjava.lang.Objectget(java.lang.Object key)Get an object from the map.IBeliefgetBelief(java.lang.String name)Get a belief for a name.IBeliefgetBelief0(java.lang.String name)Get a belief for a name.java.lang.String[]getBeliefNames()Returns the names of all beliefs.IBeliefSetgetBeliefSet(java.lang.String name)Get a belief set for a name.IBeliefSetgetBeliefSet0(java.lang.String name)Get a belief set for a name.java.lang.String[]getBeliefSetNames()Returns the names of all belief sets.voidinit()Init the beliefbase.- 
Methods inherited from class jadex.bdiv3.runtime.impl.RElementgetAgent, getCapability, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.bdiv3x.runtime.IElementgetModelElement
 
- 
 
- 
- 
- 
Field Detail- 
beliefsprotected java.util.Map<java.lang.String,IBelief> beliefs The beliefs.
 - 
beliefsetsprotected java.util.Map<java.lang.String,IBeliefSet> beliefsets The belief sets.
 - 
namesprotected java.lang.String[] names The local belief names (cached on first access).
 - 
setnamesprotected java.lang.String[] setnames The local belief set names (cached on first access).
 
- 
 - 
Constructor Detail- 
RBeliefbasepublic RBeliefbase(IInternalAccess agent) Create a new beliefbase.
 
- 
 - 
Method Detail- 
initpublic void init() Init the beliefbase.
 - 
getBelief0public IBelief getBelief0(java.lang.String name) Get a belief for a name.- Parameters:
- name- The belief name.
 
 - 
getBeliefSet0public IBeliefSet getBeliefSet0(java.lang.String name) Get a belief set for a name.- Parameters:
- name- The belief set name.
 
 - 
getBeliefpublic IBelief getBelief(java.lang.String name) Get a belief for a name.- Specified by:
- getBeliefin interface- IBeliefbase
- Parameters:
- name- The belief name.
 
 - 
getBeliefSetpublic IBeliefSet getBeliefSet(java.lang.String name) Get a belief set for a name.- Specified by:
- getBeliefSetin interface- IBeliefbase
- Parameters:
- name- The belief set name.
 
 - 
containsBeliefpublic boolean containsBelief(java.lang.String name) Returns- Specified by:
- containsBeliefin interface- IBeliefbase
- Parameters:
- name- the name of a belief.
- Returns:
- trueif contained,- falseis not contained, or the specified name refer to a belief set.
- See Also:
- containsBeliefSet(java.lang.String)
 - 
containsBeliefSetpublic boolean containsBeliefSet(java.lang.String name) Returns- Specified by:
- containsBeliefSetin interface- IBeliefbase
- Parameters:
- name- the name of a belief set.
- Returns:
- trueif contained,- falseis not contained, or the specified name refer to a belief.
- See Also:
- containsBelief(java.lang.String)
 - 
getBeliefNamespublic java.lang.String[] getBeliefNames() Returns the names of all beliefs.- Specified by:
- getBeliefNamesin interface- IBeliefbase
- Returns:
- the names of all beliefs.
 
 - 
getBeliefSetNamespublic java.lang.String[] getBeliefSetNames() Returns the names of all belief sets.- Specified by:
- getBeliefSetNamesin interface- IBeliefbase
- Returns:
- the names of all belief sets.
 
 - 
addBeliefpublic void addBelief(RBeliefbase.RBelief bel) Add a belief.- Parameters:
- bel- The belief.
 
 - 
addBeliefSetpublic void addBeliefSet(RBeliefbase.RBeliefSet belset) Add a beliefset.- Parameters:
- bel- The beliefset.
 
 - 
getpublic java.lang.Object get(java.lang.Object key) Get an object from the map.- Specified by:
- getin interface- IMapAccess
- Parameters:
- key- The key
- Returns:
- The value.
 
 
 
 
- 
 
-