T
- ID类型public interface Node<T> extends Comparable<Node<T>>, Serializable
Modifier and Type | Method and Description |
---|---|
default int |
compareTo(Node node) |
T |
getId()
获取ID
|
CharSequence |
getName()
获取节点标签名称
|
T |
getParentId()
获取父节点ID
|
Comparable<?> |
getWeight()
获取权重
|
Node<T> |
setId(T id)
设置ID
|
Node<T> |
setName(CharSequence name)
设置节点标签名称
|
Node<T> |
setParentId(T parentId)
设置父节点ID
|
Node<T> |
setWeight(Comparable<?> weight)
设置权重
|
T getId()
T getParentId()
CharSequence getName()
Node<T> setName(CharSequence name)
name
- 节点标签名称Comparable<?> getWeight()
Node<T> setWeight(Comparable<?> weight)
weight
- 权重default int compareTo(Node node)
compareTo
in interface Comparable<Node<T>>
Copyright © 2024. All rights reserved.