java.lang.Object | +--edu.gwu.algtest.MultiwayNode
An instance of class MultiwayNode
is to be used
for each node in a Multiway tree. This class is already defined
the edu.gwu.algtest
package. Thus, you only need
to create instances to use. Each instance has public fields
for the various components of a node - see below.
Field Summary | |
MultiwayNode[] |
children
The array of child pointers, to be used in non-leaf nodes. |
edu.gwu.algtest.ComparableKeyValuePair[] |
data
The array of data. |
int |
ID
This is simply a unique ID assigned to each instance to help in debugging. |
boolean |
leaf
Set this to true if the node is a leaf, false if not a leaf. |
int |
numEntries
Store the current number of data entries in the node. |
Constructor Summary | |
MultiwayNode(int degree)
|
Method Summary | |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int ID
public boolean leaf
public int numEntries
public edu.gwu.algtest.ComparableKeyValuePair[] data
data = new ComparableKeyValuePair [2*degree-1];You need to actually create the key-value pair instances to assign them here.
public MultiwayNode[] children
Constructor Detail |
public MultiwayNode(int degree)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object