Class ParsedTaskNetwork

java.lang.Object
fr.uga.pddl4j.parser.ParsedTaskNetwork
All Implemented Interfaces:
Serializable

public class ParsedTaskNetwork extends Object implements Serializable
This class implements a task network.
See Also:
Serialized Form
  • Constructor Details

    • ParsedTaskNetwork

      protected ParsedTaskNetwork()
      Create a new task network.
    • ParsedTaskNetwork

      public ParsedTaskNetwork(ParsedTaskNetwork other)
      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

      public final List<TypedSymbol<String>> getParameters()
      Returns the parameters of the task network.
      Returns:
      the parameters of the task network.
    • setParameters

      public void setParameters(List<TypedSymbol<String>> parameters)
      Sets the parameters of the task network.
      Parameters:
      parameters - the parameters to set.
    • getTasks

      public final Expression<String> getTasks()
      Returns the tasks of the task network.
      Returns:
      the tasks of the task network.
    • setTasks

      public final void setTasks(Expression<String> tasks)
      Sets the tasks of the task network.
      Parameters:
      tasks - The tasks to set.
    • getOrdering

      public final Expression<String> getOrdering()
      Returns the ordering constraints between the tasks of the task network.
      Returns:
      the ordering constraints of the task network.
    • setOrdering

      public final void setOrdering(Expression<String> constraints)
      Sets the ordering constraints between the tasks of the task network.
      Parameters:
      constraints - The constraints to set.
    • getConstraints

      public final Expression<String> getConstraints()
      Returns the logicial constraints between the tasks of the task network.
      Returns:
      the logical constraints of the task network.
    • setConstraints

      public final void setConstraints(Expression<String> constraints)
      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 class Object
      Returns:
      the hash code value of the task network.
      See Also:
      Object.hashCode()
    • equals

      public boolean equals(Object object)
      Return if this task networl is equals to another object.
      Overrides:
      equals in class Object
      Parameters:
      object - the other object.
      Returns:
      true if object is not null, is an instance of the class Action, and has the same attributs; otherwise it returns false.
      See Also:
      Object.equals(java.lang.Object)
    • toString

      public String toString()
      Returns a PDDL string representation of the method.
      Overrides:
      toString in class Object
      Returns:
      a string PDDL representation of the method.