K - the type of the belief name.V - the type of the belief value.public class BeliefValueGoal<K,V> extends AbstractBeliefGoal<K>
beliefName, outputBelief| Constructor and Description |
|---|
BeliefValueGoal()
Default constructor.
|
BeliefValueGoal(K beliefName)
Creates a new BeliefValueGoal with the provided belief.
|
BeliefValueGoal(K beliefName,
V value)
Creates a new BeliefValueGoal with the provided belief name and a value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
V |
getValue()
The belief value associated with this goal.
|
int |
hashCode() |
boolean |
isAchieved(BeliefBase beliefBase)
Checks whether this goal is achieved by verifying if the provided belief
has the value specified in this goal.
|
void |
setValue(V value)
Sets the value of this goal.
|
java.lang.String |
toString()
Returns a string representation of this goal, in the form
"BeliefValueGoal: BELIEF NAME should be BELIEF VALUE".
|
getBeliefName, getOutputBelief, setBeliefName, setOutputBeliefpublic BeliefValueGoal()
public BeliefValueGoal(K beliefName)
beliefName - the belief name.public BeliefValueGoal(K beliefName, V value)
beliefName - the belief name.value - the value that is target of this goal.public boolean equals(java.lang.Object obj)
equals in class AbstractBeliefGoal<K>Object.equals(java.lang.Object)@Parameter(direction=IN) public V getValue()
public int hashCode()
hashCode in class AbstractBeliefGoal<K>Object.hashCode()public boolean isAchieved(BeliefBase beliefBase)
beliefBase - the belief base to be checked.public void setValue(V value)
value - the value.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()