Multiple indexes for a Java Collection - most basic solution?
- by chris_l
Hi,
I'm looking for the most basic solution to create multiple indexes on a Java Collection.
Required functionality:
When a Value is removed, all index entries associated with that value must be removed.
Index lookup must be faster than linear search (at least as fast as a TreeMap).
Side conditions:
It should ideally work with JavaSE (6.0) alone - no extra libraries, if possible.
If necessary, then only small (not something like Lucene), common and well tested libraries. No database!
Of course, I could write a class that manages multiple Maps myself. But I'd like to know, if it can be done without - while still getting a simple usage similar to using a single indexed java.util.Map.
Thanks, Chris