I am writing a simple object database, that uses an AVL tree, and am trying to implement it using generics.
The database recieves recieves a request(insert, find, delete, whatever) and and in the case of insert, recieves an object and then passes it to the appropriate AVL method.
I am writing this for a specific project but would like to be able to reuse the simple database. I can easily write it using Comparable as the type, but am wanting to use generics.
This is what I have so far, I used a fairly confusing tutorial online. This is legal syntax, but I am not sure if it is correct. I will be needing to access a specific method to search for a specific search criteria, so I am thinking of requiring another interface for this purpose, would I need to add another parameter type so the tree can use both interface types? The objects being stored, are custom, but would like this to be usable by common API class(Integer,
String, ect), which makes the requirement for a second interface seem wrong.
So here is the code so far:
Assuning that this is correct(big assumption I know), how would one instantiate an object of AVLTree?
Any comments, advice or links would be greatly appreciated.
[ August 15, 2006: Message edited by: Rusty Shackleford ]