Package | Description |
---|---|
org.apache.commons.collections.list |
This package contains implementations of the
List interface. |
Modifier and Type | Field and Description |
---|---|
protected TreeList.AVLNode |
TreeList.TreeListIterator.current
Cache of the last node that was returned by
TreeList.TreeListIterator.next()
or TreeList.TreeListIterator.previous() . |
private TreeList.AVLNode |
TreeList.AVLNode.left
The left child node or the predecessor if
leftIsPrevious . |
protected TreeList.AVLNode |
TreeList.TreeListIterator.next
Cache of the next node that will be returned by
TreeList.TreeListIterator.next() . |
private TreeList.AVLNode |
TreeList.AVLNode.right
The right child node or the successor if
rightIsNext . |
private TreeList.AVLNode |
TreeList.root
The root node in the AVL tree
|
Modifier and Type | Method and Description |
---|---|
private TreeList.AVLNode |
TreeList.AVLNode.balance()
Balances according to the AVL algorithm.
|
(package private) TreeList.AVLNode |
TreeList.AVLNode.get(int index)
Locate the element with the given index relative to the
offset of the parent of this node.
|
private TreeList.AVLNode |
TreeList.AVLNode.getLeftSubTree()
Gets the left node, returning null if its a faedelung.
|
private TreeList.AVLNode |
TreeList.AVLNode.getRightSubTree()
Gets the right node, returning null if its a faedelung.
|
(package private) TreeList.AVLNode |
TreeList.AVLNode.insert(int index,
java.lang.Object obj)
Inserts a node at the position index.
|
private TreeList.AVLNode |
TreeList.AVLNode.insertOnLeft(int indexRelativeToMe,
java.lang.Object obj) |
private TreeList.AVLNode |
TreeList.AVLNode.insertOnRight(int indexRelativeToMe,
java.lang.Object obj) |
private TreeList.AVLNode |
TreeList.AVLNode.max()
Gets the rightmost child of this node.
|
private TreeList.AVLNode |
TreeList.AVLNode.min()
Gets the leftmost child of this node.
|
(package private) TreeList.AVLNode |
TreeList.AVLNode.next()
Gets the next node in the list after this one.
|
(package private) TreeList.AVLNode |
TreeList.AVLNode.previous()
Gets the node in the list before this one.
|
(package private) TreeList.AVLNode |
TreeList.AVLNode.remove(int index)
Removes the node at a given position.
|
private TreeList.AVLNode |
TreeList.AVLNode.removeMax() |
private TreeList.AVLNode |
TreeList.AVLNode.removeMin() |
private TreeList.AVLNode |
TreeList.AVLNode.removeSelf()
Removes this node from the tree.
|
private TreeList.AVLNode |
TreeList.AVLNode.rotateLeft() |
private TreeList.AVLNode |
TreeList.AVLNode.rotateRight() |
Modifier and Type | Method and Description |
---|---|
private int |
TreeList.AVLNode.getHeight(TreeList.AVLNode node)
Returns the height of the node or -1 if the node is null.
|
private int |
TreeList.AVLNode.getOffset(TreeList.AVLNode node)
Gets the relative position.
|
private void |
TreeList.AVLNode.setLeft(TreeList.AVLNode node,
TreeList.AVLNode previous)
Sets the left field to the node, or the previous node if that is null
|
private int |
TreeList.AVLNode.setOffset(TreeList.AVLNode node,
int newOffest)
Sets the relative position.
|
private void |
TreeList.AVLNode.setRight(TreeList.AVLNode node,
TreeList.AVLNode next)
Sets the right field to the node, or the next node if that is null
|
Constructor and Description |
---|
AVLNode(int relativePosition,
java.lang.Object obj,
TreeList.AVLNode rightFollower,
TreeList.AVLNode leftFollower)
Constructs a new node with a relative position.
|