Class HierarchySet
java.lang.Object
cern.nxcals.api.backport.domain.core.metadata.HierarchySet
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHierarchy(Hierarchy hierarchy) Adds the given Hierarchy object to the HierarchySet.static Collector<Hierarchy, HierarchySet, HierarchySet> Gets a List of all the Hierarchy objects within the HierarchySet.getChildHierarchies(Hierarchy hierarchy) Gets a List of Hierarchy objects which are child nodes of the given Hierarchy.getChildHierarchy(Hierarchy hierarchy, int index) Gets the child Hierarchy of the given Hierarchy at the given index.intgetChildHierarchyCount(Hierarchy hierarchy) Gets a count of the Hierarchy objects which are children of the given Hierarchy.getHierachies(int nodeLevel) Gets a List of all the Hierarchy objects within the HierarchySet at the given node level.Gets a Set of Integers which represent the distinct node levels of all Hierarchy objects within the HierarchySet.intGets a count of the number of Hierarchy objects within the HierarchySet.intgetIndexOfChildHierarchy(Hierarchy hierarchy, Hierarchy child) Gets the index of the child Hierarchy belonging to the parent Hierarchy.getParentHierarchy(Hierarchy hierarchy) Gets the parent Hierarchy of the given Hierarchy.
-
Constructor Details
-
HierarchySet
public HierarchySet()
-
-
Method Details
-
collector
-
getParentHierarchy
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
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
Gets a List of all the Hierarchy objects within the HierarchySet.- Returns:
- - a List of all the Hierarchy objects within the HierarchySet.
-
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
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
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
Gets the index of the child Hierarchy belonging to the parent Hierarchy.- Parameters:
hierarchy- - the parent Hierarchychild- - the child Hierarchy whose index is required- Returns:
- - the index of the child Hierarchy belonging to the parent Hierarchy.
-
getHierachies
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
Adds the given Hierarchy object to the HierarchySet.- Parameters:
hierarchy- - the Hierarchy object to be added to the HierarchySet.
-