Package fr.uga.pddl4j.parser
Class ParsedTaskNetwork
java.lang.Object
fr.uga.pddl4j.parser.ParsedTaskNetwork
- All Implemented Interfaces:
Serializable
This class implements a task network.
- See Also:
- Serialized Form
-
Constructor Summary
ModifierConstructorDescriptionprotected
Create a new task network.ParsedTaskNetwork(Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)
Creates a task network with a specified list of parameters, list of tasks, ordering and logicial constraints.ParsedTaskNetwork(ParsedTaskNetwork other)
Create a new task network from another.ParsedTaskNetwork(List<TypedSymbol<String>> parameters, Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)
Creates a task network with a specified list of parameters, list of tasks, ordering and logicial constraints. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return if this task networl is equals to another object.Returns the logicial constraints between the tasks of the task network.Returns the ordering constraints between the tasks of the task network.Returns the parameters of the task network.getTasks()
Returns the tasks of the task network.int
hashCode()
Returns the hash code value of the task network.boolean
Returns if this task network is durative.boolean
Returns if the task network is total ordered or not.void
setConstraints(Expression<String> constraints)
Sets the logical constraints between the tasks of the task network.void
setDurative(boolean durative)
Sets the flog of this task network as durative.void
setOrdering(Expression<String> constraints)
Sets the ordering constraints between the tasks of the task network.void
setParameters(List<TypedSymbol<String>> parameters)
Sets the parameters of the task network.void
setTasks(Expression<String> tasks)
Sets the tasks of the task network.void
setTotallyOrdered(boolean flag)
Set the boolean totally ordered flag of the task network to a specified value.toString()
Returns a PDDL string representation of the method.
-
Constructor Details
-
ParsedTaskNetwork
protected ParsedTaskNetwork()Create a new task network. -
ParsedTaskNetwork
Create a new task network from another.- Parameters:
other
- the other task network.
-
ParsedTaskNetwork
public ParsedTaskNetwork(Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)Creates a task network with a specified list of parameters, list of tasks, ordering and logicial constraints.- Parameters:
tasks
- The tasks of the task network.ordering
- The ordering constraints between the tasks of the task network.constraints
- The logical constraint between the tasks of the task network.ordered
- The flag to indicate if the tasks of the task network are totally ordered or not.durative
- The flag to indicate if the task network is durative.
-
ParsedTaskNetwork
public ParsedTaskNetwork(List<TypedSymbol<String>> parameters, Expression<String> tasks, Expression<String> ordering, Expression<String> constraints, boolean ordered, boolean durative)Creates a task network with a specified list of parameters, list of tasks, ordering and logicial constraints.- Parameters:
parameters
- the parameters of the task network.tasks
- The tasks of the task network.ordering
- The ordering constraints between the tasks of the task network.constraints
- The logical constraint between the tasks of the task network.ordered
- The flag to indicate if the tasks of the task network are totally ordered or not.durative
- The flag to indicate if the task network is durative.
-
-
Method Details
-
getParameters
Returns the parameters of the task network.- Returns:
- the parameters of the task network.
-
setParameters
Sets the parameters of the task network.- Parameters:
parameters
- the parameters to set.
-
getTasks
Returns the tasks of the task network.- Returns:
- the tasks of the task network.
-
setTasks
Sets the tasks of the task network.- Parameters:
tasks
- The tasks to set.
-
getOrdering
Returns the ordering constraints between the tasks of the task network.- Returns:
- the ordering constraints of the task network.
-
setOrdering
Sets the ordering constraints between the tasks of the task network.- Parameters:
constraints
- The constraints to set.
-
getConstraints
Returns the logicial constraints between the tasks of the task network.- Returns:
- the logical constraints of the task network.
-
setConstraints
Sets the logical constraints between the tasks of the task network.- Parameters:
constraints
- The constraints to set.
-
isTotallyOrdered
public final boolean isTotallyOrdered()Returns if the task network is total ordered or not.- Returns:
- true the method is total ordered or not, false otherwise.
-
setTotallyOrdered
public final void setTotallyOrdered(boolean flag)Set the boolean totally ordered flag of the task network to a specified value.- Parameters:
flag
- The flag to set.
-
isDurative
public final boolean isDurative()Returns if this task network is durative.- Returns:
true
if the tasknetworl is durative;false
otherwise.
-
setDurative
public final void setDurative(boolean durative)Sets the flog of this task network as durative.- Parameters:
durative
- the durative flag to set.
-
hashCode
public int hashCode()Returns the hash code value of the task network.- Overrides:
hashCode
in classObject
- Returns:
- the hash code value of the task network.
- See Also:
Object.hashCode()
-
equals
Return if this task networl is equals to another object.- Overrides:
equals
in classObject
- Parameters:
object
- the other object.- Returns:
true
ifobject
is notnull
, is an instance of the classAction
, and has the same attributs; otherwise it returnsfalse
.- See Also:
Object.equals(java.lang.Object)
-
toString
Returns a PDDL string representation of the method.
-