Class HierarchySet

  • All Implemented Interfaces:
    java.io.Serializable

    public class HierarchySet
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • HierarchySet

        public HierarchySet()
    • Method Detail

      • getParentHierarchy

        public Hierarchy getParentHierarchy​(Hierarchy hierarchy)
        Gets the parent Hierarchy of the given Hierarchy.
        Parameters:
        hierarchy - - the Hierarchy of which the parent Hierarchy should be returned.
        Returns:
        the parent Hierarchy of the given Hierarchy.
      • getChildHierarchies

        public java.util.SortedSet<Hierarchy> getChildHierarchies​(Hierarchy hierarchy)
        Gets a List of Hierarchy objects which are child nodes of the given Hierarchy.
        Parameters:
        hierarchy - - the Hierarchy of which child nodes should be returned.
        Returns:
        a List of Hierarchy objects which are child nodes of the given Hierarchy.
      • getHierarchyCount

        public int getHierarchyCount()
        Gets a count of the number of Hierarchy objects within the HierarchySet.
        Returns:
        a count of the number of Hierarchy objects within the HierarchySet.
      • getAllHierachies

        public java.util.SortedSet<Hierarchy> getAllHierachies()
        Gets a List of all the Hierarchy objects within the HierarchySet.
        Returns:
        - a List of all the Hierarchy objects within the HierarchySet.
      • getHierachyLevels

        public java.util.Set<java.lang.Integer> getHierachyLevels()
        Gets a Set of Integers which represent the distinct node levels of all Hierarchy objects within the HierarchySet.
        Returns:
        - a Set of Integers which represent the distinct node levels of all Hierarchy objects within the HierarchySet.
      • getChildHierarchyCount

        public int getChildHierarchyCount​(Hierarchy hierarchy)
        Gets a count of the Hierarchy objects which are children of the given Hierarchy.
        Parameters:
        hierarchy - - the Hierarchy for which child Hierarchy objects should be counted.
        Returns:
        a count of the Hierarchy objects which are children of the given Hierarchy.
      • getChildHierarchy

        public Hierarchy getChildHierarchy​(Hierarchy hierarchy,
                                           int index)
        Gets the child Hierarchy of the given Hierarchy at the given index.
        Parameters:
        hierarchy - - the parent Hierarchy of which the child Hierarchy at the given index should be returned.
        Returns:
        the child Hierarchy of the given Hierarchy at the given index.
      • getIndexOfChildHierarchy

        public int getIndexOfChildHierarchy​(Hierarchy hierarchy,
                                            Hierarchy child)
        Gets the index of the child Hierarchy belonging to the parent Hierarchy.
        Parameters:
        hierarchy - - the parent Hierarchy
        child - - the child Hierarchy whose index is required
        Returns:
        - the index of the child Hierarchy belonging to the parent Hierarchy.
      • getHierachies

        public java.util.SortedSet<Hierarchy> getHierachies​(int nodeLevel)
        Gets a List of all the Hierarchy objects within the HierarchySet at the given node level.
        Returns:
        - a List of all the Hierarchy objects within the HierarchySet at the given node level. Returns null if there are no hierarchies at the requested level.
      • addHierarchy

        public void addHierarchy​(Hierarchy hierarchy)
        Adds the given Hierarchy object to the HierarchySet.
        Parameters:
        hierarchy - - the Hierarchy object to be added to the HierarchySet.