Package jadex.bdiv3x.runtime
Class BeliefbaseWrapper
- java.lang.Object
 - 
- jadex.bdiv3x.runtime.BeliefbaseWrapper
 
 
- 
- All Implemented Interfaces:
 IBeliefbase,IElement,IMapAccess
public class BeliefbaseWrapper extends java.lang.Object implements IMapAccess, IBeliefbase
Prepend capability prefix to belief names. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected IBeliefbasebeliefbaseThe flat belief base.protected java.lang.String[]namesThe local belief names (cached on first access).protected java.lang.StringprefixThe full capability prefix.protected java.lang.String[]setnamesThe 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. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsBelief(java.lang.String name)ReturnsbooleancontainsBeliefSet(java.lang.String name)Returnsjava.lang.Objectget(java.lang.Object name)Get an object from the map.IBeliefgetBelief(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.java.lang.String[]getBeliefSetNames()Returns the names of all belief sets.MElementgetModelElement()Get the model element. 
 - 
 
- 
- 
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:
 getin interfaceIMapAccess- Parameters:
 name- The name- Returns:
 - The value.
 
 
- 
getModelElement
public MElement getModelElement()
Get the model element.- Specified by:
 getModelElementin interfaceIElement- Returns:
 - The model element.
 
 
- 
getBelief
public IBelief getBelief(java.lang.String name)
Get a belief for a name.- Specified by:
 getBeliefin interfaceIBeliefbase- Parameters:
 name- The belief name.
 
- 
getBeliefSet
public IBeliefSet getBeliefSet(java.lang.String name)
Get a belief set for a name.- Specified by:
 getBeliefSetin interfaceIBeliefbase- Parameters:
 name- The belief set name.
 
- 
containsBelief
public boolean containsBelief(java.lang.String name)
Returns- Specified by:
 containsBeliefin interfaceIBeliefbase- 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)
- 
containsBeliefSet
public boolean containsBeliefSet(java.lang.String name)
Returns- Specified by:
 containsBeliefSetin interfaceIBeliefbase- 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)
- 
getBeliefNames
public java.lang.String[] getBeliefNames()
Returns the names of all beliefs.- Specified by:
 getBeliefNamesin interfaceIBeliefbase- Returns:
 - the names of all beliefs.
 
 
- 
getBeliefSetNames
public java.lang.String[] getBeliefSetNames()
Returns the names of all belief sets.- Specified by:
 getBeliefSetNamesin interfaceIBeliefbase- Returns:
 - the names of all belief sets.
 
 
 
 
 - 
 
 -