public abstract class Belief<T> extends MetadataElement implements java.io.Serializable, jade.content.Concept
| Constructor and Description |
|---|
Belief(java.lang.String name)
Initializes a belief with its name.
|
Belief(java.lang.String name,
T value)
Initializes a belief with its name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBeliefBase(BeliefBase beliefBase)
Adds a belief base that contains this belief.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<BeliefBase> |
getBeliefBases() |
java.lang.String |
getName()
Gets the name of the Belief.
|
abstract T |
getValue()
Gets the current value of the Belief.
|
int |
hashCode() |
void |
removeBeliefBase(BeliefBase beliefBases)
Removes a belief base that does not contain this belief anymore.
|
abstract void |
setValue(T value)
Sets a new value to the belief.
|
java.lang.String |
toString() |
getMetadata, getMetadata, hasMetadata, putMetadata, removeMetadatapublic Belief(java.lang.String name)
name - the belief name.public Belief(java.lang.String name,
T value)
name - the belief name.value - the belief initial value.public void addBeliefBase(BeliefBase beliefBase)
beliefBase - the belief base to be added.public final boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.util.Set<BeliefBase> getBeliefBases()
public final java.lang.String getName()
public abstract T getValue()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public void removeBeliefBase(BeliefBase beliefBases)
beliefBases - the belief base to be removed.public abstract void setValue(T value)
value - the new value.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()