OOCList : OOCCollection
Sorted mutable collection
- (id) objectAtIndex:(NSInteger)index
Returns the model in position index
.
- (OOCModel*) first
Returns the first model in the list.
- (OOCModel*) last
Returns the last model in the list.
- (OOCCollection*) collectionWithRange:(NSRange)range
Returns a new collection with the objects within range
. The new collection keeps the order, and is immutable.
- (void) replace:(id)models
Removes all objects from the list and adds in the same order all the models
.
- (void) push:(OOCModel*)model
Adds a model at the end of the list.
- (void) unshift:(OOCModel*)model
Adds a model at the beginning of the list.
- (void) remove:(OOCModel*)model
Removes all occurrences of model
in the list.
- (NSArray*) ids
Returns an array with the id of the objects in the list.
Updated less than a minute ago