public abstract class DerivedBelief<K,V> extends AbstractBelief<K,V>
metadata| Constructor and Description |
|---|
DerivedBelief()
The default constructor.
|
DerivedBelief(K name)
Creates a new derived belief.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBeliefBase(BeliefBase beliefBase)
Adds a belief base with which this belief is associated.
|
protected abstract V |
evaluate()
Evaluates the value of this belief, which is derived from beliefs of the
main belief base associated with this belief.
|
BeliefBase |
getMainBeliefBase()
Returns the main belief base of this belief.
|
V |
getValue()
Returns the value of this belief.
|
void |
removeBeliefBase(BeliefBase beliefBase)
Removes a belief base associated with this belief.
|
void |
setMainBeliefBase(BeliefBase mainBeliefBase)
Sets the main belief base of this belief.
|
protected void |
updateValue(V value)
This method throws a
NullPointerException, as this operation is
invalid for this belief. |
clone, equals, getBeliefBases, getName, hashCode, notifyBeliefBases, setName, setValue, toStringgetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadatafinalize, getClass, notify, notifyAll, wait, wait, waitgetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadatapublic DerivedBelief()
public DerivedBelief(K name)
name - the belief name.public void addBeliefBase(BeliefBase beliefBase)
addBeliefBase in interface Belief<K,V>addBeliefBase in class AbstractBelief<K,V>beliefBase - the belief base to be added.AbstractBelief.addBeliefBase(bdi4jade.belief.BeliefBase)protected abstract V evaluate()
public BeliefBase getMainBeliefBase()
public V getValue()
evaluate() is invoked.Belief.getValue()public void removeBeliefBase(BeliefBase beliefBase)
removeBeliefBase in interface Belief<K,V>removeBeliefBase in class AbstractBelief<K,V>beliefBase - the belief base to be removed.AbstractBelief.removeBeliefBase(bdi4jade.belief.BeliefBase)public void setMainBeliefBase(BeliefBase mainBeliefBase)
mainBeliefBase - the main belief base to set.protected void updateValue(V value)
NullPointerException, as this operation is
invalid for this belief. The value of this belief cannot be set as it is
derived from other beliefs.updateValue in class AbstractBelief<K,V>value - the value to set.