I have an NSMutableOrderedSet which contains NSDate objects. Initially, here are the values:
2014-10-08 12:46:48 +0000
2014-10-08 12:46:42 +0000
After calling addObject with 2014-10-08 12:45:40 +0000, I get the following output:
2014-10-08 12:46:42 +0000
2014-10-08 12:46:48 +0000
2014-10-08 12:45:40 +0000
Why aren't they ordered?
an
NSMutablOrderedSetis not like a JavaTreeSetwhich is kept sorted. Look ataddObject:documentation:You should manually call
or