T
- ID类型public class TreeNode<T> extends Object implements Node<T>
TreeNodeConfig
中被重命名Constructor and Description |
---|
TreeNode()
空构造
|
TreeNode(T id,
T parentId,
String name,
Comparable<?> weight)
构造
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Map<String,Object> |
getExtra()
获取扩展字段
|
T |
getId()
获取ID
|
CharSequence |
getName()
获取节点标签名称
|
T |
getParentId()
获取父节点ID
|
Comparable<?> |
getWeight()
获取权重
|
int |
hashCode() |
TreeNode<T> |
setExtra(Map<String,Object> extra)
设置扩展字段
|
TreeNode<T> |
setId(T id)
设置ID
|
TreeNode<T> |
setName(CharSequence name)
设置节点标签名称
|
TreeNode<T> |
setParentId(T parentId)
设置父节点ID
|
TreeNode<T> |
setWeight(Comparable<?> weight)
设置权重
|
public TreeNode()
public TreeNode(T id, T parentId, String name, Comparable<?> weight)
id
- IDparentId
- 父节点IDname
- 名称weight
- 权重public T getParentId()
Node
getParentId
in interface Node<T>
public TreeNode<T> setParentId(T parentId)
Node
setParentId
in interface Node<T>
parentId
- 父节点IDpublic CharSequence getName()
Node
public TreeNode<T> setName(CharSequence name)
Node
public Comparable<?> getWeight()
Node
public TreeNode<T> setWeight(Comparable<?> weight)
Node
public TreeNode<T> setExtra(Map<String,Object> extra)
extra
- 扩展字段Copyright © 2024. All rights reserved.