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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.