K - the type of the belief name.V - the type of the values in the belief set.public class BeliefSetHasValueGoal<K,V> extends AbstractBeliefGoal<K>
beliefName, outputBelief| Constructor and Description |
|---|
BeliefSetHasValueGoal()
Default constructor.
|
BeliefSetHasValueGoal(K beliefSetName,
V value)
Creates a new BeliefSetValueGoal 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
set contains 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
"BeliefSetValueGoal: BELIEF NAME should have BELIEF VALUE".
|
getBeliefName, getOutputBelief, setBeliefName, setOutputBeliefpublic BeliefSetHasValueGoal()
public BeliefSetHasValueGoal(K beliefSetName, V value)
beliefSetName - 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()