Hi,
I'd like to write an applet, which will create many objects (all of the
same type) , which can be identified by two integers X and Y.
At a later moment I'd like to retrieve the previously created /
calculated object by specifying it's X and Y value.
I think, that a B-tree might be the right data structure for storing my
data, as I will continiously add / search / remove elements.
Instead of implementing one more version of a B-Tree or a similiar
structure I wanted to know whether there are already good open source
libraries, that implement such data structures (B-Tree / linked list /
hash / sort )
thanks a lot for any pointers
N
Mark Space - 10 Mar 2008 23:30 GMT
> Hi,
>
[quoted text clipped - 3 lines]
> At a later moment I'd like to retrieve the previously created /
> calculated object by specifying it's X and Y value.
<http://java.sun.com/docs/books/tutorial/collections/index.html>
Specifically TreeSet and TreeMap:
<http://java.sun.com/docs/books/tutorial/collections/index.html>
But ultimately you might find HashMap/HashSet gives better performance.
Roedy Green - 11 Mar 2008 02:10 GMT
>Instead of implementing one more version of a B-Tree or a similiar
>structure I wanted to know whether there are already good open source
>libraries, that implement such data structures (B-Tree / linked list /
>hash / sort )
Sun collections include
http://mindprod.com/jgloss/hashmap.html
http://mindprod.com/jgloss/sort.html
http://mindprod.com/jgloss/treemap.html
http://mindprod.com/jgloss/linkedlist.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com