The requirement I have is for every type T, I have a number of elements (between 1-30+) and at first I need random item, then I need the next, and when I reach the last item, it should return the first one and so on.
So say T is Icon, and the collection is Images (instance).
I want to have:
// program start:
Icon icon = RandomIcon(); // say 5th one for this case
// user clicks next icon:
icon = current++; (6, 7, 8, 1, 2, ...)
To me a circular linked list makes sense, except that I have to do O(n) where n is the random index.
I want to have the cleanest, best implemenation, hence the question.