Reputation: 15251
I need to maintain column names, and not allow duplicate entries, while maintaining the order of these column names with associated index of it's own.
Down the road I need to swap column name at an index, and also add more column names to the end or beginning.
LinkedHashSet<E>
seems like an ideal candidate, are there any others?
Need to support Synchronization
Upvotes: 0
Views: 266
Reputation: 597016
commons-collections has SetUniqueList
- it is a List
that guarantees uniqueness.
Upvotes: 1