@InterfaceAudience.Private public static class AvlUtil.AvlIterableList extends Object
Constructor and Description |
---|
AvlIterableList() |
Modifier and Type | Method and Description |
---|---|
static <TNode extends AvlUtil.AvlLinkedNode> |
append(TNode head,
TNode node)
Append a node to the tree
|
static <TNode extends AvlUtil.AvlLinkedNode> |
appendList(TNode head,
TNode otherHead)
Append a list of nodes to the tree
|
static <TNode extends AvlUtil.AvlLinkedNode> |
isLinked(TNode node)
Return true if the node is linked to a list, false otherwise
|
static <TNode extends AvlUtil.AvlLinkedNode> |
prepend(TNode head,
TNode node)
Prepend a node to the tree
|
static <TNode extends AvlUtil.AvlLinkedNode> |
prepend(TNode head,
TNode base,
TNode node)
Prepend a node to the tree before a specific node
|
static <TNode extends AvlUtil.AvlLinkedNode> |
readNext(TNode node)
Return the successor of the current node
|
static <TNode extends AvlUtil.AvlLinkedNode> |
readPrev(TNode node)
Return the predecessor of the current node
|
static <TNode extends AvlUtil.AvlLinkedNode> |
remove(TNode head,
TNode node)
Remove a node from the tree
|
public AvlIterableList()
public static <TNode extends AvlUtil.AvlLinkedNode> TNode readNext(TNode node)
node
- the current nodepublic static <TNode extends AvlUtil.AvlLinkedNode> TNode readPrev(TNode node)
node
- the current nodepublic static <TNode extends AvlUtil.AvlLinkedNode> TNode prepend(TNode head, TNode node)
head
- the head of the linked listnode
- the node to add to the front of the listpublic static <TNode extends AvlUtil.AvlLinkedNode> TNode append(TNode head, TNode node)
head
- the head of the linked listnode
- the node to add to the tail of the listpublic static <TNode extends AvlUtil.AvlLinkedNode> TNode appendList(TNode head, TNode otherHead)
head
- the head of the current linked listotherHead
- the head of the list to append to the current listpublic static <TNode extends AvlUtil.AvlLinkedNode> TNode remove(TNode head, TNode node)
head
- the head of the linked listnode
- the node to remove from the listpublic static <TNode extends AvlUtil.AvlLinkedNode> TNode prepend(TNode head, TNode base, TNode node)
head
- the head of the linked listbase
- the node which we want to add the node
before itnode
- the node which we want to add it before the base
nodepublic static <TNode extends AvlUtil.AvlLinkedNode> boolean isLinked(TNode node)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.