BeliefBase.html

821 lines | 35.22 kB Blame History Raw Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_20) on Mon Sep 22 13:06:33 BRT 2014 -->
<title>BeliefBase</title>
<meta name="date" content="2014-09-22">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="BeliefBase";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BeliefBase.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../bdi4jade/belief/BeliefSet.html" title="interface in bdi4jade.belief"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?bdi4jade/belief/BeliefBase.html" target="_top">Frames</a></li>
<li><a href="BeliefBase.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">bdi4jade.belief</div>
<h2 title="Class BeliefBase" class="title">Class BeliefBase</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>bdi4jade.belief.BeliefBase</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">BeliefBase</span>
extends java.lang.Object
implements java.io.Serializable</pre>
<div class="block">This class represents a belief base of a capability. It aggregates its
 knowledge.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Ingrid Nunes</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../serialized-form.html#bdi4jade.belief.BeliefBase">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#BeliefBase--">BeliefBase</a></span>()</code>
<div class="block">The default constructor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#BeliefBase-bdi4jade.core.Capability-">BeliefBase</a></span>(<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;capability)</code>
<div class="block">Creates a belief base associated with a capability.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#BeliefBase-bdi4jade.core.Capability-java.util.Set-">BeliefBase</a></span>(<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;capability,
          java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;beliefs)</code>
<div class="block">Creates a belief base associated with a capability and adds the beliefs
 in the provided belief set as the initial beliefs of this belief base.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#addBelief-bdi4jade.belief.Belief-">addBelief</a></span>(<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&nbsp;belief)</code>
<div class="block">Adds a belief to the belief base.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#addBeliefListener-bdi4jade.event.BeliefListener-">addBeliefListener</a></span>(<a href="../../bdi4jade/event/BeliefListener.html" title="interface in bdi4jade.event">BeliefListener</a>&nbsp;beliefListener)</code>
<div class="block">Adds a belief listener to be notified about changes in the belief base.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#addOrUpdateBelief-bdi4jade.belief.Belief-">addOrUpdateBelief</a></span>(<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&nbsp;belief)</code>
<div class="block">Adds a belief to the belief base.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getBelief-java.lang.Object-">getBelief</a></span>(java.lang.Object&nbsp;name)</code>
<div class="block">Retrieves a belief from the belief base.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../bdi4jade/event/BeliefListener.html" title="interface in bdi4jade.event">BeliefListener</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getBeliefListeners--">getBeliefListeners</a></span>()</code>
<div class="block">Returns all the current belief listeners of this belief base.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getBeliefs--">getBeliefs</a></span>()</code>
<div class="block">Gets all beliefs of this belief base and the belief bases of the
 whole-capabilities of the capability that this belief base belongs to.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getBeliefsAssignableFrom-java.lang.Class-">getBeliefsAssignableFrom</a></span>(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</code>
<div class="block">Returns all beliefs whose name is of the given class or any other class
 that is assignable to this class.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getBeliefsByType-java.lang.Class-">getBeliefsByType</a></span>(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</code>
<div class="block">Returns all beliefs whose name is of the given class.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getCapability--">getCapability</a></span>()</code>
<div class="block">Returns the capability with which this belief base is associated.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getLocalBeliefs--">getLocalBeliefs</a></span>()</code>
<div class="block">Gets all beliefs of this specific belief base.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getLocalBeliefsAssignableFrom-java.lang.Class-">getLocalBeliefsAssignableFrom</a></span>(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</code>
<div class="block">Returns all beliefs whose name is of the given class or any other class
 that is assignable to this class.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getLocalBeliefsByType-java.lang.Class-">getLocalBeliefsByType</a></span>(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</code>
<div class="block">Returns beliefs whose name is of the given class.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#getLocalBeliefValues--">getLocalBeliefValues</a></span>()</code>
<div class="block">Returns a list of belief values from this belief base.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#hasBelief-java.lang.Object-">hasBelief</a></span>(java.lang.Object&nbsp;name)</code>
<div class="block">Checks whether a belief is part of the belief base.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#hasBelief-java.lang.Object-java.lang.Object-">hasBelief</a></span>(java.lang.Object&nbsp;name,
         java.lang.Object&nbsp;value)</code>
<div class="block">Checks whether a belief is part of the belief base with an specific
 value.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#notifyBeliefChanged-bdi4jade.event.BeliefEvent-">notifyBeliefChanged</a></span>(<a href="../../bdi4jade/event/BeliefEvent.html" title="class in bdi4jade.event">BeliefEvent</a>&nbsp;beliefChanged)</code>
<div class="block">Notifies the capability associated with this belief base that a belief
 was modified.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#removeBelief-java.lang.Object-">removeBelief</a></span>(java.lang.Object&nbsp;name)</code>
<div class="block">Removes a belief from the belief base.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#removeBeliefListener-bdi4jade.event.BeliefListener-">removeBeliefListener</a></span>(<a href="../../bdi4jade/event/BeliefListener.html" title="interface in bdi4jade.event">BeliefListener</a>&nbsp;beliefListener)</code>
<div class="block">Removes a belief listener.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#setCapability-bdi4jade.core.Capability-">setCapability</a></span>(<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;capability)</code>
<div class="block">Associates a capability with this belief base.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#size--">size</a></span>()</code>
<div class="block">Gets the size of this specific belief base (the number of beliefs).</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#toString--">toString</a></span>()</code>
<div class="block">Returns this belief base as a string in the form:
 "Belief base of Capability ID = [ BELIEFS ]".</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../bdi4jade/belief/BeliefBase.html#updateBelief-java.lang.Object-java.lang.Object-">updateBelief</a></span>(java.lang.Object&nbsp;name,
            java.lang.Object&nbsp;value)</code>
<div class="block">Updates the value of a belief in the belief base.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="BeliefBase--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BeliefBase</h4>
<pre>protected&nbsp;BeliefBase()</pre>
<div class="block">The default constructor. It should be only used if persistence frameworks
 are used.</div>
</li>
</ul>
<a name="BeliefBase-bdi4jade.core.Capability-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BeliefBase</h4>
<pre>public&nbsp;BeliefBase(<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;capability)</pre>
<div class="block">Creates a belief base associated with a capability.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>capability</code> - the capability to which this belief base belongs.</dd>
</dl>
</li>
</ul>
<a name="BeliefBase-bdi4jade.core.Capability-java.util.Set-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BeliefBase</h4>
<pre>public&nbsp;BeliefBase(<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;capability,
                  java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;beliefs)</pre>
<div class="block">Creates a belief base associated with a capability and adds the beliefs
 in the provided belief set as the initial beliefs of this belief base.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>capability</code> - the capability to which this belief base belongs.</dd>
<dd><code>beliefs</code> - the initial beliefs.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="addBelief-bdi4jade.belief.Belief-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addBelief</h4>
<pre>public&nbsp;void&nbsp;addBelief(<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&nbsp;belief)</pre>
<div class="block">Adds a belief to the belief base.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>belief</code> - the belief to be added.</dd>
</dl>
</li>
</ul>
<a name="addBeliefListener-bdi4jade.event.BeliefListener-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addBeliefListener</h4>
<pre>public&nbsp;void&nbsp;addBeliefListener(<a href="../../bdi4jade/event/BeliefListener.html" title="interface in bdi4jade.event">BeliefListener</a>&nbsp;beliefListener)</pre>
<div class="block">Adds a belief listener to be notified about changes in the belief base.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefListener</code> - the listener to be added.</dd>
</dl>
</li>
</ul>
<a name="addOrUpdateBelief-bdi4jade.belief.Belief-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addOrUpdateBelief</h4>
<pre>public&nbsp;void&nbsp;addOrUpdateBelief(<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&nbsp;belief)</pre>
<div class="block">Adds a belief to the belief base. It updates the belief value, if it
 already exists.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>belief</code> - the belief to be added or updated.</dd>
</dl>
</li>
</ul>
<a name="getBelief-java.lang.Object-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBelief</h4>
<pre>public&nbsp;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&nbsp;getBelief(java.lang.Object&nbsp;name)</pre>
<div class="block">Retrieves a belief from the belief base. If this belief base does not
 contain it, the method checks whole-capabilities' belief base
 recursively.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the belief to be retrieved.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the belief, or null if no belief is found.</dd>
</dl>
</li>
</ul>
<a name="getBeliefListeners--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBeliefListeners</h4>
<pre>public&nbsp;java.util.Set&lt;<a href="../../bdi4jade/event/BeliefListener.html" title="interface in bdi4jade.event">BeliefListener</a>&gt;&nbsp;getBeliefListeners()</pre>
<div class="block">Returns all the current belief listeners of this belief base.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the belief listeners.</dd>
</dl>
</li>
</ul>
<a name="getBeliefs--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBeliefs</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;getBeliefs()</pre>
<div class="block">Gets all beliefs of this belief base and the belief bases of the
 whole-capabilities of the capability that this belief base belongs to.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the beliefs of this capability and all of its whole-capabilities.</dd>
</dl>
</li>
</ul>
<a name="getBeliefsAssignableFrom-java.lang.Class-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBeliefsAssignableFrom</h4>
<pre>public&nbsp;java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;getBeliefsAssignableFrom(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</pre>
<div class="block">Returns all beliefs whose name is of the given class or any other class
 that is assignable to this class. It also searches beliefs in belief
 bases of whole capabilities.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefNameType</code> - the class of the name of beliefs.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of beliefs assignable from the given class.</dd>
</dl>
</li>
</ul>
<a name="getBeliefsByType-java.lang.Class-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBeliefsByType</h4>
<pre>public&nbsp;java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;getBeliefsByType(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</pre>
<div class="block">Returns all beliefs whose name is of the given class. It also searches
 beliefs in belief bases of whole capabilities.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefNameType</code> - the class of the name of beliefs.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of beliefs of the given class.</dd>
</dl>
</li>
</ul>
<a name="getCapability--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCapability</h4>
<pre>public&nbsp;<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;getCapability()</pre>
<div class="block">Returns the capability with which this belief base is associated.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the capability.</dd>
</dl>
</li>
</ul>
<a name="getLocalBeliefs--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalBeliefs</h4>
<pre>public&nbsp;java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;getLocalBeliefs()</pre>
<div class="block">Gets all beliefs of this specific belief base.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the beliefs</dd>
</dl>
</li>
</ul>
<a name="getLocalBeliefsAssignableFrom-java.lang.Class-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalBeliefsAssignableFrom</h4>
<pre>public&nbsp;java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;getLocalBeliefsAssignableFrom(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</pre>
<div class="block">Returns all beliefs whose name is of the given class or any other class
 that is assignable to this class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefNameType</code> - the class of the name of beliefs.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of beliefs assignable from the given class.</dd>
</dl>
</li>
</ul>
<a name="getLocalBeliefsByType-java.lang.Class-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalBeliefsByType</h4>
<pre>public&nbsp;java.util.Set&lt;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&gt;&nbsp;getLocalBeliefsByType(java.lang.Class&lt;?&gt;&nbsp;beliefNameType)</pre>
<div class="block">Returns beliefs whose name is of the given class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefNameType</code> - the class of the name of beliefs.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of beliefs of the given class.</dd>
</dl>
</li>
</ul>
<a name="getLocalBeliefValues--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalBeliefValues</h4>
<pre>public&nbsp;java.util.List&lt;java.lang.Object&gt;&nbsp;getLocalBeliefValues()</pre>
<div class="block">Returns a list of belief values from this belief base.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the beliefValues</dd>
</dl>
</li>
</ul>
<a name="hasBelief-java.lang.Object-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasBelief</h4>
<pre>public&nbsp;boolean&nbsp;hasBelief(java.lang.Object&nbsp;name)</pre>
<div class="block">Checks whether a belief is part of the belief base. If this belief base
 does not contain it, the method checks whole-capabilities' belief base
 recursively.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the belief to be checked</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the belief base contains the belief.</dd>
</dl>
</li>
</ul>
<a name="hasBelief-java.lang.Object-java.lang.Object-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasBelief</h4>
<pre>public&nbsp;boolean&nbsp;hasBelief(java.lang.Object&nbsp;name,
                         java.lang.Object&nbsp;value)</pre>
<div class="block">Checks whether a belief is part of the belief base with an specific
 value. If this belief base does not contain it, the method checks
 whole-capabilities' belief base recursively.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the belief to be checked</dd>
<dd><code>value</code> - the value to be checked</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the belief base contains the belief.</dd>
</dl>
</li>
</ul>
<a name="notifyBeliefChanged-bdi4jade.event.BeliefEvent-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notifyBeliefChanged</h4>
<pre>protected&nbsp;void&nbsp;notifyBeliefChanged(<a href="../../bdi4jade/event/BeliefEvent.html" title="class in bdi4jade.event">BeliefEvent</a>&nbsp;beliefChanged)</pre>
<div class="block">Notifies the capability associated with this belief base that a belief
 was modified. It also recursively notifies belief listeners of part
 capabilities.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefChanged</code> - the belief that was changed</dd>
</dl>
</li>
</ul>
<a name="removeBelief-java.lang.Object-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeBelief</h4>
<pre>public&nbsp;<a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief">Belief</a>&lt;?,?&gt;&nbsp;removeBelief(java.lang.Object&nbsp;name)</pre>
<div class="block">Removes a belief from the belief base. If this belief base does not
 contain it, the method checks whole-capabilities' belief base recursively
 to remove this belief..</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the belief to be removed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the belief was removed, null if it is not part of the belief
         base.</dd>
</dl>
</li>
</ul>
<a name="removeBeliefListener-bdi4jade.event.BeliefListener-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeBeliefListener</h4>
<pre>public&nbsp;void&nbsp;removeBeliefListener(<a href="../../bdi4jade/event/BeliefListener.html" title="interface in bdi4jade.event">BeliefListener</a>&nbsp;beliefListener)</pre>
<div class="block">Removes a belief listener.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beliefListener</code> - the listener to be removed.</dd>
</dl>
</li>
</ul>
<a name="setCapability-bdi4jade.core.Capability-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCapability</h4>
<pre>protected&nbsp;void&nbsp;setCapability(<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a>&nbsp;capability)</pre>
<div class="block">Associates a capability with this belief base. Ideally, the capability
 should be final and initialized in the constructor. This method should be
 only used if persistence frameworks are used.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>capability</code> - the capability to set.</dd>
</dl>
</li>
</ul>
<a name="size--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
<div class="block">Gets the size of this specific belief base (the number of beliefs).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the size of this belief base.</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<div class="block">Returns this belief base as a string in the form:
 "Belief base of Capability ID = [ BELIEFS ]".</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the string representation of this belief base.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>Object.toString()</code></dd>
</dl>
</li>
</ul>
<a name="updateBelief-java.lang.Object-java.lang.Object-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>updateBelief</h4>
<pre>public&nbsp;boolean&nbsp;updateBelief(java.lang.Object&nbsp;name,
                            java.lang.Object&nbsp;value)</pre>
<div class="block">Updates the value of a belief in the belief base. In case the belief is
 not present in the belief base (of in its whole-capabilities' belief
 bases), nothing is performed and the method returns false. If the type of
 the new value being provided does not match the current type, the method
 still subscribes the previous value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the belief to be updated.</dd>
<dd><code>value</code> - the new value to the belief.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the belief was updated.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BeliefBase.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../bdi4jade/belief/Belief.html" title="interface in bdi4jade.belief"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../bdi4jade/belief/BeliefSet.html" title="interface in bdi4jade.belief"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?bdi4jade/belief/BeliefBase.html" target="_top">Frames</a></li>
<li><a href="BeliefBase.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>