At least I think that describes it.

Here's the application: I have a very large collection of objects that has an int key. Structural changes (add/remove) occur extremely seldom.

Wouldn't it be useful to have a data structure such that accessing it by that key is simply an array lookup?

myObject = myArray[key];

Removal support could be handled by setting that index to null and holding on to a stack of unused indexes. Adding new values use up the unused indexes before appending to the end.

I have already written a simple initial implementation of this. I'm wondering:

1) Do others think this is generally useful?
2) Is this functionality already available in the commons-collections and I missed it?
3) Would it be useful to include this in commons-collections?


Thank you,

Joel Shellman

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to