Package fr.uga.pddl4j.planners.htn.stn
Class PFDNode
java.lang.Object
fr.uga.pddl4j.planners.htn.stn.AbstractSTNNode
fr.uga.pddl4j.planners.htn.stn.PFDNode
- All Implemented Interfaces:
Serializable
This class implements a node for the PFDPlanner planner of the PDDL4J library.
- Since:
- 4.0
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class fr.uga.pddl4j.planners.htn.stn.AbstractSTNNode
DEFAULT_OPERATOR, DEFAULT_TASK -
Constructor Summary
ConstructorsConstructorDescriptionPFDNode()Creates a new empty node with an empty state and an empty task network.Creates a new node from an other.PFDNode(State state, TaskNetwork taskNetwork)Creates a new node with a specified state and task network.PFDNode(State state, TaskNetwork taskNetwork, PFDNode parent, int operator, int task)Creates a new node with a specified state and task network. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif a node is equals to an other object.Returns the task network of the node.inthashCode()Returns the hash code value of the node.voidsetTaskNetwork(TaskNetwork taskNetwork)Sets the tasks network of the node.Methods inherited from class fr.uga.pddl4j.planners.htn.stn.AbstractSTNNode
getOperator, getParent, getState, getTask, setOperator, setParent, setState, setTask
-
Constructor Details
-
PFDNode
Creates a new node from an other. This constructor creates a deep copy of the node in parameters.- Parameters:
other- the node to be copied.
-
PFDNode
public PFDNode()Creates a new empty node with an empty state and an empty task network. The parent node is set to null, the operator is set to DEFAULT_OPERATOR and the task is set to DEFAULT_TASK. -
PFDNode
Creates a new node with a specified state and task network. The parent node is set to null, the operator is set to DEFAULT_OPERATOR and the task is set to DEFAULT_TASK.- Parameters:
state- state of this node.taskNetwork- the task network of the node.
-
PFDNode
Creates a new node with a specified state and task network.- Parameters:
state- srate of this node.taskNetwork- the task network of the node.parent- the parent node of the node.operator- the index of the operator applied to reach the node.task- the task processed in this node.
-
-
Method Details
-
getTaskNetwork
Returns the task network of the node. The task network describes the set of tasks to be accomplished and their constraints that have to be verified.- Returns:
- the task network of the node.
-
setTaskNetwork
Sets the tasks network of the node. The task network describes the set of tasks to be accomplished and their constraints that have to be verified.- Parameters:
taskNetwork- the task network of the node.
-
equals
Returnstrueif a node is equals to an other object. An object is equals to this node if and only if the other object is an instance ofPFDNodeand have the same task network.- Overrides:
equalsin classObject- Parameters:
obj- the object to be compared.- Returns:
trueif a node is equals to an other object,falseotherwise.- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()Returns the hash code value of the node.- Overrides:
hashCodein classObject- Returns:
- the hash code value of the node.
- See Also:
Object.hashCode()
-