Class Hierarchy

java.lang.Object
fr.uga.pddl4j.plan.Hierarchy
All Implemented Interfaces:
Serializable

public class Hierarchy extends Object implements Serializable
This abstract class implements the main methods to manipulate the hierarchical information of a plan.
Since:
4.0
See Also:
Serialized Form
  • Constructor Details

    • Hierarchy

      public Hierarchy()
      Creates a new empty hierarchy.
    • Hierarchy

      public Hierarchy(Hierarchy other)
      Creates a deep copy of an existing hierarchy.
      Parameters:
      other - the existing hierarchy.
  • Method Details

    • getRootTasks

      public final List<Integer> getRootTasks()
      Returns the root tasks of the hierarchy.
      Returns:
      the root tasks of the hierarchy.
    • getPrimtiveTasks

      public Map<Integer,​Action> getPrimtiveTasks()
      Returns the list of primitive tasks of the hierarchy and corresponding task IDs.
      Returns:
      the list of primitive tasks of the hierarchy and corresponding task IDs.
    • getCounpoudTasks

      public Map<Integer,​Method> getCounpoudTasks()
      Returns the list of compound tasks of the hierarchy and corresponding task IDs.
      Returns:
      the list of compound tasks of the hierarchy and corresponding task IDs.
    • getDecomposition

      public Map<Integer,​List<Integer>> getDecomposition()
      Returns the decomposition of the compound task. Task IDs are used as key of the map return. Only cooumpund task has a entry in the map.
      Returns:
      the decomposition of the compound task.
    • equals

      public boolean equals(Object other)
      Returns if a hierarchy is equals to an other object. The method returns true if the other object is an instance of the class hierarchy and has the same root tasks, primitives and compund tasks set and decomposition.
      Overrides:
      equals in class Object
      Parameters:
      other - the other object to be compared.
      Returns:
      true if this hierarchy is equal to the object in parameter; false otherwise.
    • hashCode

      public int hashCode()
      Returns the hashcode value of this hierarchy.
      Overrides:
      hashCode in class Object
      Returns:
      the hashcode value of this hierarchy.