Package | Description |
---|---|
org.apache.commons.collections4.list |
This package contains implementations of the
List interface. |
Modifier and Type | Field and Description |
---|---|
private TreeList.AVLNode<E> |
TreeList.TreeListIterator.current
Cache of the last node that was returned by
TreeList.TreeListIterator.next()
or TreeList.TreeListIterator.previous() . |
private TreeList.AVLNode<E> |
TreeList.AVLNode.left
The left child node or the predecessor if
leftIsPrevious . |
private TreeList.AVLNode<E> |
TreeList.TreeListIterator.next
Cache of the next node that will be returned by
TreeList.TreeListIterator.next() . |
private TreeList.AVLNode<E> |
TreeList.AVLNode.right
The right child node or the successor if
rightIsNext . |
private TreeList.AVLNode<E> |
TreeList.root
The root node in the AVL tree
|
Modifier and Type | Method and Description |
---|---|
private TreeList.AVLNode<E> |
TreeList.AVLNode.addAll(TreeList.AVLNode<E> otherTree,
int currentSize)
Appends the elements of another tree list to this tree list by efficiently
merging the two AVL trees.
|
private TreeList.AVLNode<E> |
TreeList.AVLNode.balance()
Balances according to the AVL algorithm.
|
(package private) TreeList.AVLNode<E> |
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<E> |
TreeList.AVLNode.getLeftSubTree()
Gets the left node, returning null if its a faedelung.
|
private TreeList.AVLNode<E> |
TreeList.AVLNode.getRightSubTree()
Gets the right node, returning null if its a faedelung.
|
(package private) TreeList.AVLNode<E> |
TreeList.AVLNode.insert(int index,
E obj)
Inserts a node at the position index.
|
private TreeList.AVLNode<E> |
TreeList.AVLNode.insertOnLeft(int indexRelativeToMe,
E obj) |
private TreeList.AVLNode<E> |
TreeList.AVLNode.insertOnRight(int indexRelativeToMe,
E obj) |
private TreeList.AVLNode<E> |
TreeList.AVLNode.max()
Gets the rightmost child of this node.
|
private TreeList.AVLNode<E> |
TreeList.AVLNode.min()
Gets the leftmost child of this node.
|
(package private) TreeList.AVLNode<E> |
TreeList.AVLNode.next()
Gets the next node in the list after this one.
|
(package private) TreeList.AVLNode<E> |
TreeList.AVLNode.previous()
Gets the node in the list before this one.
|
(package private) TreeList.AVLNode<E> |
TreeList.AVLNode.remove(int index)
Removes the node at a given position.
|
private TreeList.AVLNode<E> |
TreeList.AVLNode.removeMax() |
private TreeList.AVLNode<E> |
TreeList.AVLNode.removeMin() |
private TreeList.AVLNode<E> |
TreeList.AVLNode.removeSelf()
Removes this node from the tree.
|
private TreeList.AVLNode<E> |
TreeList.AVLNode.rotateLeft() |
private TreeList.AVLNode<E> |
TreeList.AVLNode.rotateRight() |
Modifier and Type | Method and Description |
---|---|
private TreeList.AVLNode<E> |
TreeList.AVLNode.addAll(TreeList.AVLNode<E> otherTree,
int currentSize)
Appends the elements of another tree list to this tree list by efficiently
merging the two AVL trees.
|
private int |
TreeList.AVLNode.getHeight(TreeList.AVLNode<E> node)
Returns the height of the node or -1 if the node is null.
|
private int |
TreeList.AVLNode.getOffset(TreeList.AVLNode<E> node)
Gets the relative position.
|
private void |
TreeList.AVLNode.setLeft(TreeList.AVLNode<E> node,
TreeList.AVLNode<E> previous)
Sets the left field to the node, or the previous node if that is null
|
private void |
TreeList.AVLNode.setLeft(TreeList.AVLNode<E> node,
TreeList.AVLNode<E> previous)
Sets the left field to the node, or the previous node if that is null
|
private int |
TreeList.AVLNode.setOffset(TreeList.AVLNode<E> node,
int newOffest)
Sets the relative position.
|
private void |
TreeList.AVLNode.setRight(TreeList.AVLNode<E> node,
TreeList.AVLNode<E> next)
Sets the right field to the node, or the next node if that is null
|
private void |
TreeList.AVLNode.setRight(TreeList.AVLNode<E> node,
TreeList.AVLNode<E> next)
Sets the right field to the node, or the next node if that is null
|
Constructor and Description |
---|
AVLNode(int relativePosition,
E obj,
TreeList.AVLNode<E> rightFollower,
TreeList.AVLNode<E> leftFollower)
Constructs a new node with a relative position.
|
AVLNode(int relativePosition,
E obj,
TreeList.AVLNode<E> rightFollower,
TreeList.AVLNode<E> leftFollower)
Constructs a new node with a relative position.
|
AVLNode(java.util.Iterator<? extends E> iterator,
int start,
int end,
int absolutePositionOfParent,
TreeList.AVLNode<E> prev,
TreeList.AVLNode<E> next)
Constructs a new AVL tree from a collection.
|
AVLNode(java.util.Iterator<? extends E> iterator,
int start,
int end,
int absolutePositionOfParent,
TreeList.AVLNode<E> prev,
TreeList.AVLNode<E> next)
Constructs a new AVL tree from a collection.
|