We have NSSet
for a collection of unordered unique elements and NSOrderedSet
for a collection of ordered unique elements.
Still, we have NSArray
for a collection of ordered non-unique elements, but no data structure for an unordered list of non-unique elements (as far as I know).
Does this container exist in Foundation? Is there a third-party container that manages such? If not either, is there a classy way of getting a randomized sequence of elements from an NSArray
?