If anybody is familiar with Objective-C there is a collection called NSOrderedSet that acts as Set and its items can be accessed as an Array‘s ones.
Is there anything like this in Java?
I’ve heard there is a collection called LinkedHashMap, but I haven’t found anything like it for a set.
Take a look at
LinkedHashSetclass for insertion-order, implementingSequencedSet&Setinterfaces.From Java doc: