Uses of Class
cn.nukkit.utils.SortedList.Node
-
Uses of SortedList.Node in cn.nukkit.utils
Modifier and TypeMethodDescriptionprotected SortedList<T>.Node
SortedList.findFirstNodeWithValue
(T value) 返回表示树中给定值的节点,如果不存在此类节点,则该节点可以为null。protected SortedList<T>.Node
SortedList.findNodeAtIndex
(int index) protected SortedList<T>.Node
SortedList.Node.getGrandParent()
返回此节点的父节点,该节点可能为空。protected SortedList<T>.Node
SortedList.Node.getLeftChild()
protected SortedList<T>.Node
SortedList.Node.getParent()
protected SortedList<T>.Node
SortedList.Node.getRightChild()
protected SortedList<T>.Node
SortedList.getRoot()
protected final SortedList<T>.Node
SortedList.Node.largestNodeInSubTree()
protected final SortedList<T>.Node
SortedList.Node.predecessor()
获取树中下一个最小的节点,如果这是值最小的节点,则为null。protected final SortedList<T>.Node
SortedList.Node.smallestNodeInSubTree()
protected final SortedList<T>.Node
SortedList.Node.successor()
获取树中下一个最大的节点,如果这是值最大的节点,则为null。Modifier and TypeMethodDescriptionprotected void
SortedList.add
(SortedList<T>.Node toAdd) 将给定节点添加到此SortedList。int
SortedList.Node.compareTo
(SortedList<T>.Node other) 使用比较器将存储在该节点上的值与给定节点上的值进行比较,如果这些值相等,则比较其ID上的节点。我们认定较老的节点较小。protected void
SortedList.remove
(SortedList<T>.Node toRemove) 从这个SortedList中删除给定的节点,如果需要重新平衡,也会添加modCount。 时间复杂度O(log(n))。