|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.cs.algs4.growingtree.framework.NodeAndKey<P>
public class NodeAndKey<P extends NodeProperties>
An object which keeps both a BSTTree node and an integer key. Useful when dealing with waitingActions that must involve both a node and key. This class makes that possible within one object.
Constructor Summary | |
---|---|
NodeAndKey()
Constructor, making an empty NodeAndKey Object. |
|
NodeAndKey(GrowingTreeNode<P> node,
int key)
Constructor, making a NodeAndKey Object with the speficied node and key. |
Method Summary | |
---|---|
int |
getKey()
Gets the key for the object. |
GrowingTreeNode<P> |
getNode()
Gets the node for the object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeAndKey()
public NodeAndKey(GrowingTreeNode<P> node, int key)
node
- BSTTree node for the current NodeAndKey.key
- int for the NodeAndKey.Method Detail |
---|
public GrowingTreeNode<P> getNode()
public int getKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |