What's the right Java generic for a collection of elements with unique addressable indices?
- by Rocreex
I'm on my way to programming a database application and in our course we are told to implement a library of elements using one of the Java Collections. Each of the elements has a unique ID with which it's supposed to be addressed. Now I am wondering how this can be done.
I though about using a ListArray but this won't work because the only way of addressing List elements is through the index which you can't control.
Do you have some advice for me?