public class HierarchyUtils extends Object
| Constructor and Description |
|---|
HierarchyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<HierarchyNode> |
getSortedNodes(Collection<HierarchyNode> nodes)
Create a sorted list of nodes based on a set of input nodes,
list goes from root (or highest parent) down to the bottom most node
|
static Set<String> |
getUniqueChildNodes(Collection<HierarchyNode> nodes,
boolean includeSuppliedNodeIds,
boolean directOnly)
Create a set of all the unique child node ids based on the set of supplied nodes,
can optionally be limited to return only direct children and to include the supplied node ids
|
static Set<String> |
getUniqueParentNodes(Collection<HierarchyNode> nodes,
boolean includeSuppliedNodeIds,
boolean directOnly)
Create a set of all the unique parent node ids based on the set of supplied nodes,
can optionally be limited to return only direct parents and to include the supplied node ids
|
public static List<HierarchyNode> getSortedNodes(Collection<HierarchyNode> nodes)
nodes - HierarchyNodepublic static Set<String> getUniqueChildNodes(Collection<HierarchyNode> nodes, boolean includeSuppliedNodeIds, boolean directOnly)
nodes - a collection of HierarchyNodeincludeSuppliedNodes - includes the nodeIds of the supplied collection of nodes in the returned setdirectOnly - only use the direct children of each nodepublic static Set<String> getUniqueParentNodes(Collection<HierarchyNode> nodes, boolean includeSuppliedNodeIds, boolean directOnly)
nodes - a collection of HierarchyNodeincludeSuppliedNodes - includes the nodeIds of the supplied collection of nodes in the returned setdirectOnly - only use the direct parents of each nodeCopyright © 2003–2021 Sakai Project. All rights reserved.