jason.bb
Class TextPersistentBB
java.lang.Object
jason.bb.ChainBBAdapter
jason.bb.TextPersistentBB
- All Implemented Interfaces:
- BeliefBase, java.lang.Cloneable, java.lang.Iterable<Literal>
public class TextPersistentBB
- extends ChainBBAdapter
Implementation of BB that stores the agent BB in text files. This
implementation is very simple: when the agent starts, load the
beliefs in the file; when the agent stops, save the BB in the file.
The file name is the agent's name + ".bb".
Method Summary |
void |
init(Agent ag,
java.lang.String[] args)
Called before the MAS execution with the agent that uses this
BB and the args informed in .mas2j project.
Example in .mas2j:
agent BeliefBaseClass(1,bla);
the init args will be ["1", "bla"]. |
void |
stop()
Called just before the end of MAS execution |
Methods inherited from class jason.bb.ChainBBAdapter |
abolish, add, add, clone, contains, getAll, getAsDOM, getCandidateBeliefs, getCandidateBeliefs, getLastBB, getNextAdapter, getPercepts, getRelevant, iterator, remove, setNext, size, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TextPersistentBB
public TextPersistentBB()
TextPersistentBB
public TextPersistentBB(BeliefBase next)
init
public void init(Agent ag,
java.lang.String[] args)
- Description copied from interface:
BeliefBase
- Called before the MAS execution with the agent that uses this
BB and the args informed in .mas2j project.
Example in .mas2j:
agent BeliefBaseClass(1,bla);
the init args will be ["1", "bla"].
- Specified by:
init
in interface BeliefBase
- Overrides:
init
in class ChainBBAdapter
stop
public void stop()
- Description copied from interface:
BeliefBase
- Called just before the end of MAS execution
- Specified by:
stop
in interface BeliefBase
- Overrides:
stop
in class ChainBBAdapter