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
treeset is an ordered set, but you can't access via an items index, just iterate through or go to beginning/end.