Class VirtualTree.Builder<T,ID>
java.lang.Object
cloud.opencode.base.tree.virtual.VirtualTree.Builder<T,ID>
- Type Parameters:
T- the data type | 数据类型ID- the ID type | ID类型
- Enclosing class:
VirtualTree<T,ID>
Virtual Tree Builder
虚拟树构建器
- Since:
- JDK 25, opencode-base-tree V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the virtual tree node 构建虚拟树节点cacheEnabled(boolean cacheEnabled) Enable or disable cache 启用或禁用缓存childLoader(LazyChildLoader<VirtualTree<T, ID>, ID> childLoader) Set child loader 设置子节点加载器Set node data 设置节点数据Set node ID 设置节点IDmaxCacheSize(int maxCacheSize) Set max cache size 设置最大缓存大小Set node cache 设置节点缓存Set parent ID 设置父节点ID
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Set node ID 设置节点ID- Parameters:
id- the ID | ID- Returns:
- the builder | 构建器
-
parentId
Set parent ID 设置父节点ID- Parameters:
parentId- the parent ID | 父节点ID- Returns:
- the builder | 构建器
-
data
Set node data 设置节点数据- Parameters:
data- the data | 数据- Returns:
- the builder | 构建器
-
childLoader
Set child loader 设置子节点加载器- Parameters:
childLoader- the loader | 加载器- Returns:
- the builder | 构建器
-
nodeCache
Set node cache 设置节点缓存- Parameters:
nodeCache- the cache | 缓存- Returns:
- the builder | 构建器
-
maxCacheSize
Set max cache size 设置最大缓存大小- Parameters:
maxCacheSize- the max size | 最大大小- Returns:
- the builder | 构建器
-
cacheEnabled
Enable or disable cache 启用或禁用缓存- Parameters:
cacheEnabled- whether enabled | 是否启用- Returns:
- the builder | 构建器
-
build
-