Uses of Class
cloud.opencode.base.tree.TreeNode
Packages that use TreeNode
-
Uses of TreeNode in cloud.opencode.base.tree
Methods in cloud.opencode.base.tree that return TreeNodeModifier and TypeMethodDescriptionTreeBuilder.buildFromMap(Map<String, Object> data, String childrenKey) Build from nested map structure 从嵌套映射结构构建TreeBuilder.buildFromMap(Map<String, Object> data, String childrenKey, int maxDepth) Build from nested map structure with depth limit 从嵌套映射结构构建(带深度限制)static <T,ID> TreeNode <T> OpenTree.buildSingle(Collection<T> items, Function<T, ID> idExtractor, Function<T, ID> parentIdExtractor) static <T,ID> TreeNode <T> TreeBuilder.buildSingle(Collection<T> items, Function<T, ID> idExtractor, Function<T, ID> parentIdExtractor) Build single rooted tree 构建单根树static <T> TreeNode<T> TreeTraverser.findLowestCommonAncestor(TreeNode<T> node1, TreeNode<T> node2) Finds lowest common ancestor 查找最近公共祖先TreeNode.getParent()TreeNode.getRoot()<R> TreeNode<R> static <T,R> TreeNode <R> Maps tree to new data type 将树映射到新数据类型static <T,R> TreeNode <R> Maps tree with node context 带节点上下文的树映射static <T> TreeNode<T> OpenTree.node(T data) Methods in cloud.opencode.base.tree that return types with arguments of type TreeNodeModifier and TypeMethodDescriptionTreeTraverser.breadthFirstIterator(TreeNode<T> root) Creates a breadth-first iterator 创建广度优先迭代器TreeTraverser.breadthFirstStream(TreeNode<T> root) Creates a breadth-first stream 创建广度优先流OpenTree.build(Collection<T> items, Function<T, ID> idExtractor, Function<T, ID> parentIdExtractor) TreeBuilder.build(Collection<T> items, Function<T, ID> idExtractor, Function<T, ID> parentIdExtractor) Build tree from flat list 从扁平列表构建树TreeNode.getAncestors()TreeTraverser.getAncestors(TreeNode<T> node) Gets ancestors from parent to root 获取从父节点到根节点的祖先TreeNode.getChildren()TreeNode.getDescendants()TreeTraverser.getDescendants(TreeNode<T> node) Gets all descendants 获取所有后代TreeNode.getLeaves()TreeNode.getSiblings()TreeTraverser.getSiblings(TreeNode<T> node) Gets all siblings 获取所有兄弟节点TreeTraverser.parallelStream(TreeNode<T> root) Creates a parallel stream 创建并行流TreeTraverser.postOrderIterator(TreeNode<T> root) Creates a post-order iterator 创建后序迭代器TreeTraverser.postOrderStream(TreeNode<T> root) Creates a post-order stream 创建后序流TreeTraverser.preOrderIterator(TreeNode<T> root) Creates a pre-order iterator 创建前序迭代器Creates a pre-order stream of TreeNode 创建TreeNode的前序流Methods in cloud.opencode.base.tree with parameters of type TreeNodeModifier and TypeMethodDescriptionTreeTraverser.breadthFirstIterator(TreeNode<T> root) Creates a breadth-first iterator 创建广度优先迭代器TreeTraverser.breadthFirstStream(TreeNode<T> root) Creates a breadth-first stream 创建广度优先流static <T> TreeNode<T> TreeTraverser.findLowestCommonAncestor(TreeNode<T> node1, TreeNode<T> node2) Finds lowest common ancestor 查找最近公共祖先static <T,R> Stream <R> Flat maps tree to stream 扁平映射树到流static <T> List<T> static <T> List<T> Flatten tree to list 将树展平为列表static <T> List<TreeBuilder.NodeWithDepth<T>> OpenTree.flattenWithDepth(TreeNode<T> root) static <T> List<TreeBuilder.NodeWithDepth<T>> TreeBuilder.flattenWithDepth(TreeNode<T> root) Flatten tree to list with depth info 将树展平为带深度信息的列表static <T,R> R TreeTraverser.foldBottomUp(TreeNode<T> root, Function<T, R> leafMapper, BiFunction<T, List<R>, R> branchFolder) Folds tree bottom-up 自底向上折叠树TreeTraverser.getAncestors(TreeNode<T> node) Gets ancestors from parent to root 获取从父节点到根节点的祖先static <T> intGets the depth of a node 获取节点深度TreeTraverser.getDescendants(TreeNode<T> node) Gets all descendants 获取所有后代TreeTraverser.getSiblings(TreeNode<T> node) Gets all siblings 获取所有兄弟节点static <T,R> TreeNode <R> Maps tree to new data type 将树映射到新数据类型static <T,R> TreeNode <R> Maps tree with node context 带节点上下文的树映射TreeTraverser.parallelStream(TreeNode<T> root) Creates a parallel stream 创建并行流TreeTraverser.postOrderIterator(TreeNode<T> root) Creates a post-order iterator 创建后序迭代器TreeTraverser.postOrderStream(TreeNode<T> root) Creates a post-order stream 创建后序流TreeTraverser.preOrderIterator(TreeNode<T> root) Creates a pre-order iterator 创建前序迭代器static <T> Stringstatic <T> voidOpenTree.printToConsole(TreeNode<T> root) static <T,R> R TreeTraverser.reduce(TreeNode<T> root, R identity, BiFunction<R, T, R> accumulator) Reduces tree to single value 将树归约为单个值static <T,R> R TreeTraverser.reduce(TreeNode<T> root, R identity, BiFunction<R, T, R> accumulator, BinaryOperator<R> combiner) Reduces tree with combiner (for parallel) 带组合器的树归约(用于并行)booleanTreeNode.removeChild(TreeNode<T> child) Creates a pre-order stream of TreeNode 创建TreeNode的前序流static <T> booleanTreeTraverser.traverse(TreeNode<T> root, TreeTraverser.ControlledVisitor<T> visitor) Traverses tree with control 带控制的树遍历static <T> StringSerialize TreeNode to JSON 将TreeNode序列化为JSONstatic <T> StringSerialize TreeNode to XML 将TreeNode序列化为XMLMethod parameters in cloud.opencode.base.tree with type arguments of type TreeNodeModifier and TypeMethodDescriptionstatic <T,R> Stream <R> Flat maps tree to stream 扁平映射树到流voidTreeNode.forEachBreadthFirst(Consumer<TreeNode<T>> action) voidTreeNode.forEachPostOrder(Consumer<TreeNode<T>> action) voidTreeNode.forEachPreOrder(Consumer<TreeNode<T>> action) static <T,R> TreeNode <R> Maps tree with node context 带节点上下文的树映射 -
Uses of TreeNode in cloud.opencode.base.tree.serialization
Methods in cloud.opencode.base.tree.serialization with parameters of type TreeNodeModifier and TypeMethodDescriptionstatic <T> StringSerialize TreeNode to JSON 将TreeNode序列化为JSONstatic <T> StringTreeSerializer.treeNodeToJson(TreeNode<T> root, Function<T, Map<String, Object>> dataSerializer, TreeSerializer.SerializerConfig config) Serialize TreeNode to JSON with config 使用配置将TreeNode序列化为JSONstatic <T> StringSerialize TreeNode to XML 将TreeNode序列化为XMLstatic <T> StringTreeSerializer.treeNodeToXml(TreeNode<T> root, Function<T, Map<String, Object>> dataSerializer, TreeSerializer.SerializerConfig config) Serialize TreeNode to XML with config 使用配置将TreeNode序列化为XML