K - the type of the belief name.V - the type of the values in the belief set.public class BeliefSetHasValueGoal<K,V> extends java.lang.Object implements BeliefGoal<K>
| 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) |
K |
getBeliefName()
Returns the name of the belief associated with this goal.
|
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 |
setBeliefName(K beliefName)
Sets the name of the belief associated with 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".
|
public 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 java.lang.ObjectObject.equals(java.lang.Object)@Parameter(direction=IN) public K getBeliefName()
getBeliefName in interface BeliefGoal<K>@Parameter(direction=IN) public V getValue()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isAchieved(BeliefBase beliefBase)
isAchieved in interface BeliefGoal<K>beliefBase - the belief base to be checked.public void setBeliefName(K beliefName)
beliefName - the belief name.public void setValue(V value)
value - the value.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()