|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.scottlogic.util.SortedList.Node
com.scottlogic.util.UnsortedList.UnsortedNode
protected class UnsortedList.UnsortedNode
Class representing the individual nodes of an unsorted list extends the regular SortedList.Node class by storing the position of the node in the tree.
Field Summary |
---|
Fields inherited from class com.scottlogic.util.SortedList.Node |
---|
id |
Method Summary | |
---|---|
int |
compareTo(SortedList.Node other)
Compares this node with the given node - which must be an UnsortedNode instance
in the same UnsortedList . |
protected int |
getIndexInList()
Gets the index of this node in the list, using the cached value if it is not stale and otherwise calculating it from the ancestor nodes and setting the cached value. |
Methods inherited from class com.scottlogic.util.SortedList.Node |
---|
getGrandParent, getLeftChild, getParent, getRightChild, getValue, hasTwoChildren, isLeaf, isLeftChildOfParent, isRightChildOfParent, largestNodeInSubTree, predecessor, sizeOfSubTree, smallestNodeInSubTree, successor, toString, updateAdditionalCachedValues, updateCachedValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
protected int getIndexInList()
public int compareTo(SortedList.Node other)
UnsortedNode
instance
in the same UnsortedList
. The comparison is based on the current position
of the nodes in the list.
Nodes with equal indices are compared on whether they are in the tree yet or not; those in the tree are considered to be larger.
compareTo
in interface java.lang.Comparable<SortedList.Node>
compareTo
in class SortedList.Node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |