I’m sure this will upset some folks, but in my case I actually had need of a sorted, unique (set) that also could return an element from an index. Apache created ListOrderedSet , which is fine but might be a little more than is needed for rare or limited use-cases.

Here’s a couple quick-and-dirty approaches:

or…