Class: NSMutableOrderedSet
- Inherits:
-
NSOrderedSet
- Object
- NSObject
- NSOrderedSet
- NSMutableOrderedSet
Overview
NSMutableOrderedSet class declares the programmatic interface to a mutable, ordered collection of distinct objects.
Class Method Summary (collapse)
-
+ orderedSetWithCapacity:
Creates and returns an mutable ordered set with a given initial capacity.
Instance Method Summary (collapse)
-
- addObject:
Appends a given object to the mutable ordered set, if it is not already a member.
-
- addObjects:count:
Appends the given number of objects from a given C array.
-
- addObjectsFromArray:
Appends to the mutable ordered set each object contained in a given array that is not already a member.
-
- exchangeObjectAtIndex:withObjectAtIndex:
Exchanges the object at the specified index with the object at the other index.
-
- initWithCapacity:
Returns an initialized mutable ordered set with a given initial capacity.
-
- insertObject:atIndex:
Inserts the given object at the specified index of the mutable ordered set.
-
- insertObjects:atIndexes:
Inserts the objects in the array at the specified indexes.
-
- intersectOrderedSet:
Removes from the receiving ordered set each object that isn’t a member of another ordered set.
-
- intersectSet:
Removes from the receiving ordered set each object that isn’t a member of another set.
-
- minusOrderedSet:
Removes each object in another given ordered set from the receiving mutable ordered set, if present.
-
- minusSet:
Removes each object in another given set from the receiving mutable ordered set, if present.
-
- moveObjectsAtIndexes:toIndex:
Moves the object at the specified indexes to the new location.
-
- removeAllObjects
Removes all the objects from the mutable ordered set.
-
- removeObject:
Removes a given object from the mutable ordered set.
-
- removeObjectAtIndex:
Removes a the object at the specified index from the mutable ordered set.
-
- removeObjectsAtIndexes:
Removes the objects at the specified indexes from the mutable ordered set.
-
- removeObjectsInArray:
Removes the objects in the array from the mutable ordered set.
-
- removeObjectsInRange:
Removes from the mutable ordered set each of the objects within a given range.
-
- replaceObjectAtIndex:withObject:
Replaces the object at the specified index with the new object.
-
- replaceObjectsAtIndexes:withObjects:
Replaces the objects at the specified indexes with the new objects.
-
- replaceObjectsInRange:withObjects:count:
Replaces the objects in the receiving mutable ordered set at the range with the specified number of objects from a given C array.
-
- setObject:atIndex:
Appends or replaces the object at the specified index.
-
- setObject:atIndexedSubscript:
Inserts the given object at the specified index of the mutable ordered set.
-
- sortRange:options:usingComparator:
Sorts the specified range of the mutable ordered set using the specified options and the comparison method specified by a given comparator block.
-
- sortUsingComparator:
Sorts the mutable ordered set using the comparison method specified by the comparator block.
-
- sortWithOptions:usingComparator:
Sorts the mutable ordered set using the specified options and the comparison method specified by a given comparator block.
-
- unionOrderedSet:
Adds each object in another given ordered set to the receiving mutable ordered set, if not present.
-
- unionSet:
Adds each object in another given set to the receiving mutable ordered set, if not present.
Methods inherited from NSOrderedSet
#addObserver:forKeyPath:options:context:, #array, #containsObject:, #count, #description, #descriptionWithLocale:, #descriptionWithLocale:indent:, #enumerateObjectsAtIndexes:options:usingBlock:, #enumerateObjectsUsingBlock:, #enumerateObjectsWithOptions:usingBlock:, #firstObject, #getObjects:range:, #indexOfObject:, #indexOfObject:inSortedRange:options:usingComparator:, #indexOfObjectAtIndexes:options:passingTest:, #indexOfObjectPassingTest:, #indexOfObjectWithOptions:passingTest:, #indexesOfObjectsAtIndexes:options:passingTest:, #indexesOfObjectsPassingTest:, #indexesOfObjectsWithOptions:passingTest:, #initWithArray:, #initWithArray:copyItems:, #initWithArray:range:copyItems:, #initWithObject:, #initWithObjects:, #initWithObjects:count:, #initWithOrderedSet:, #initWithOrderedSet:copyItems:, #initWithOrderedSet:range:copyItems:, #initWithSet:, #initWithSet:copyItems:, #intersectsOrderedSet:, #intersectsSet:, #isEqualToOrderedSet:, #isSubsetOfOrderedSet:, #isSubsetOfSet:, #lastObject, #objectAtIndex:, #objectAtIndexedSubscript:, #objectEnumerator, #objectsAtIndexes:, orderedSet, orderedSetWithArray:, orderedSetWithArray:range:copyItems:, orderedSetWithObject:, orderedSetWithObjects:, orderedSetWithObjects:count:, orderedSetWithOrderedSet:, orderedSetWithOrderedSet:range:copyItems:, orderedSetWithSet:, orderedSetWithSet:copyItems:, #removeObserver:forKeyPath:, #removeObserver:forKeyPath:context:, #reverseObjectEnumerator, #reversedOrderedSet, #set, #setValue:forKey:, #sortedArrayUsingComparator:, #sortedArrayWithOptions:usingComparator:, #valueForKey:
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Class Method Details
+ (Object) orderedSetWithCapacity(numItems)
Creates and returns an mutable ordered set with a given initial capacity. Mutable ordered sets allocate additional memory as needed, so numItems simply establishes the set’s initial capacity.
Instance Method Details
- (Object) addObject(object)
Appends a given object to the mutable ordered set, if it is not already a member.
- (Object) addObjects(objects, count:count)
Appends the given number of objects from a given C array.
- (Object) addObjectsFromArray(array)
Appends to the mutable ordered set each object contained in a given array that is not already a member.
- (Object) exchangeObjectAtIndex(idx1, withObjectAtIndex:idx2)
Exchanges the object at the specified index with the object at the other index.
- (Object) initWithCapacity(numItems)
Returns an initialized mutable ordered set with a given initial capacity. Mutable ordered sets allocate additional memory as needed, so numItems simply establishes the set’s initial capacity.
- (Object) insertObject(object, atIndex:idx)
Inserts the given object at the specified index of the mutable ordered set. If the index is already occupied, the objects at index and beyond are shifted by adding 1 to their indices to make room.
- (Object) insertObjects(objects, atIndexes:indexes)
Inserts the objects in the array at the specified indexes. Each object in objects is inserted into the receiving mutable ordered set in turn at the corresponding location specified in indexes after earlier insertions have been made.
- (Object) intersectOrderedSet(other)
Removes from the receiving ordered set each object that isn’t a member of another ordered set.
- (Object) intersectSet(other)
Removes from the receiving ordered set each object that isn’t a member of another set.
- (Object) minusOrderedSet(other)
Removes each object in another given ordered set from the receiving mutable ordered set, if present.
- (Object) minusSet(other)
Removes each object in another given set from the receiving mutable ordered set, if present.
- (Object) moveObjectsAtIndexes(indexes, toIndex:idx)
Moves the object at the specified indexes to the new location.
- (Object) removeAllObjects
Removes all the objects from the mutable ordered set.
- (Object) removeObject(object)
Removes a given object from the mutable ordered set.
- (Object) removeObjectAtIndex(idx)
Removes a the object at the specified index from the mutable ordered set. To fill the gap, all elements beyond index are moved by subtracting 1 from their index.
- (Object) removeObjectsAtIndexes(indexes)
Removes the objects at the specified indexes from the mutable ordered set. This method is similar to removeObjectAtIndex:, but allows you to efficiently remove multiple objects with a single operation.
- (Object) removeObjectsInArray(array)
Removes the objects in the array from the mutable ordered set. This method is similar to removeObject:, but allows you to efficiently remove large sets of objects with a single operation. If the receiving mutable ordered set does not contain objects in array, the method has no effect (although it does incur the overhead of searching the contents).This method assumes that all elements in array respond to hash and isEqual:.
- (Object) removeObjectsInRange(range)
Removes from the mutable ordered set each of the objects within a given range. The objects are removed using removeObjectAtIndex:.
- (Object) replaceObjectAtIndex(idx, withObject:object)
Replaces the object at the specified index with the new object.
- (Object) replaceObjectsAtIndexes(indexes, withObjects:objects)
Replaces the objects at the specified indexes with the new objects. The indexes in indexes are used in the same order as the objects in objects.If objects or indexes is nil, this method raises an exception.
- (Object) replaceObjectsInRange(range, withObjects:objects, count:count)
Replaces the objects in the receiving mutable ordered set at the range with the specified number of objects from a given C array. Elements are added to the new array in the same order they appear in objects, up to but not including index count.
- (Object) setObject(obj, atIndex:idx)
Appends or replaces the object at the specified index.
- (Object) setObject(obj, atIndexedSubscript:idx)
Inserts the given object at the specified index of the mutable ordered set. If the index is already occupied, the objects at index and beyond are shifted by adding 1 to their indices to make room.This method is identical to insertObject:atIndex:.
- (Object) sortRange(range, options:opts, usingComparator:cmptr)
Sorts the specified range of the mutable ordered set using the specified options and the comparison method specified by a given comparator block.
- (Object) sortUsingComparator(cmptr)
Sorts the mutable ordered set using the comparison method specified by the comparator block.
- (Object) sortWithOptions(opts, usingComparator:cmptr)
Sorts the mutable ordered set using the specified options and the comparison method specified by a given comparator block.
- (Object) unionOrderedSet(other)
Adds each object in another given ordered set to the receiving mutable ordered set, if not present.
- (Object) unionSet(other)
Adds each object in another given set to the receiving mutable ordered set, if not present.