Object NestedSetUtil
-
- All Implemented Interfaces:
public class NestedSetUtil
Utility class for working with nested set trees. This class provides methods to build a tree structure from a list of nested set nodes.
-
-
Field Summary
Fields Modifier and Type Field Description public final static NestedSetUtil
INSTANCE
-
Method Summary
-
-
Method Detail
-
tree
final <ID extends Any, E extends INestedSetNode<ID, E>, T extends INestedSetNodeResponse<ID>> List<T> tree(List<E> nodes, Function1<E, T> convert)
Build a tree structure from a list of nested set nodes.
- Parameters:
nodes
- List of nested set nodes.convert
- Function to convert a node to its response type.- Returns:
List of top-level nodes with their children.
-
-
-
-