Tuesday, June 5, 2001 04:48 PM
I wish to write an implementation of a tree data structure. In the interest of reusability, i would like to provide it's functionality through a standard interface, if any has been defined by Java/J2EE. But when i see the API, java.util has no particular interface that models a tree. There are two classes TreeMap and TreeSet but they actually model an ordered Map and Set respectively (so it seems) and lack the fuctionality that i would expect from a tree or treenode ie. parent(), children(), root(), isLeaf() etc...
So, what is the java recommended standard interface for a tree data structure ?
Thanks in advance.