public class IndexedPriorityQueue.Node<T extends E> extends java.lang.Object implements java.lang.Comparable<IndexedPriorityQueue.Node<T>>, java.io.Serializable
Constructor and Description |
---|
IndexedPriorityQueue.Node(int i,
T value) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IndexedPriorityQueue.Node<T> o) |
boolean |
equals(java.lang.Object obj) |
IndexedPriorityQueue.Node<T> |
getLeftChild() |
IndexedPriorityQueue.Node<T> |
getRightChild() |
int |
i() |
IndexedPriorityQueue.Node<T> |
minimumChild() |
E |
minimumValue() |
IndexedPriorityQueue.Node<T> |
parent() |
void |
setI(int i) |
void |
setLeftChild(IndexedPriorityQueue.Node<T> leftChild) |
void |
setParent(IndexedPriorityQueue.Node<T> parent) |
void |
setRightChild(IndexedPriorityQueue.Node<T> rightChild) |
void |
setValue(T value) |
java.lang.String |
toString() |
java.lang.String |
treeRepresentation(int deep) |
E |
value() |
public IndexedPriorityQueue.Node(int i, T value)
i
- value
- public int compareTo(IndexedPriorityQueue.Node<T> o)
compareTo
in interface java.lang.Comparable<IndexedPriorityQueue.Node<T extends E>>
public IndexedPriorityQueue.Node<T> parent()
public void setParent(IndexedPriorityQueue.Node<T> parent)
parent
- the parent to setpublic int i()
public void setI(int i)
i
- the i to setpublic E value()
public void setValue(T value)
value
- Value for this node, t_ipublic void setRightChild(IndexedPriorityQueue.Node<T> rightChild)
rightChild
- the rightChild to setpublic void setLeftChild(IndexedPriorityQueue.Node<T> leftChild)
leftChild
- the leftChild to setpublic IndexedPriorityQueue.Node<T> getRightChild()
public IndexedPriorityQueue.Node<T> getLeftChild()
public E minimumValue()
public IndexedPriorityQueue.Node<T> minimumChild()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String treeRepresentation(int deep)