RBFragmentedArray Class Reference
Inherits from | NSObject |
---|---|
Declared in | RBFragmentedArray.h |
firstIndex
The first (lowest) index of an object stored in the array.
@property (nonatomic, readonly) NSUInteger firstIndex
Discussion
The first (lowest) index of an object stored in the array.
Declared In
RBFragmentedArray.h
lastIndex
The last (highest) index of an object stored in the array.
@property (nonatomic, readonly) NSUInteger lastIndex
Discussion
The last (highest) index of an object stored in the array.
Declared In
RBFragmentedArray.h
count
The number of objects stored in the array.
@property (nonatomic, readonly) NSUInteger count
Discussion
The number of objects stored in the array.
Declared In
RBFragmentedArray.h
firstObject
The first object (with the lowest index) stored in the array.
@property (nonatomic, readonly, nullable) id firstObject
Discussion
The first object (with the lowest index) stored in the array.
Declared In
RBFragmentedArray.h
lastObject
The last object (with the highest index) stored in the array.
@property (nonatomic, readonly, nullable) id lastObject
Discussion
The last object (with the highest index) stored in the array.
Declared In
RBFragmentedArray.h
indexes
An array of indexes for which objects are stored in the array.
@property (nonatomic, readonly, nonnull) NSArray *indexes
Discussion
An array of indexes for which objects are stored in the array.
Declared In
RBFragmentedArray.h
– setObject:atIndex:
Sets the object stored in the array at a given index.
- (void)setObject:(nullable id)object atIndex:(NSUInteger)index
Parameters
object |
The object to store. If object is |
---|---|
index |
The index at which to store the object. |
Discussion
Sets the object stored in the array at a given index.
Declared In
RBFragmentedArray.h
– removeObjectAtIndex:
Removes the object stored at the given index.
- (void)removeObjectAtIndex:(NSUInteger)index
Parameters
index |
The index at which the object is stored. |
---|
Discussion
Removes the object stored at the given index.
Declared In
RBFragmentedArray.h
– removeAllObjects
Removes all of the objects stored in the array.
- (void)removeAllObjects
Discussion
Removes all of the objects stored in the array.
Declared In
RBFragmentedArray.h
– hasIndex:
Determines whether an object is stored at the given index.
- (BOOL)hasIndex:(NSUInteger)index
Parameters
index |
The index at which to check if an object is stored. |
---|
Return Value
Whether or not an object is stored at the given index.
Discussion
Determines whether an object is stored at the given index.
Declared In
RBFragmentedArray.h
– objectAtIndex:
Retrieves the object stored at the given index.
- (nullable id)objectAtIndex:(NSUInteger)index
Parameters
index |
The index to retrieve the object for. |
---|
Return Value
The object stored at the index, or nil if there was no object found.
Discussion
Retrieves the object stored at the given index.
Declared In
RBFragmentedArray.h
– enumerateObjectsUsingBlock:
Enumerates the objects stored in the array.
- (void)enumerateObjectsUsingBlock:(nonnull void ( ^ ) ( id __nonnull obj , NSUInteger idx , BOOL *__nonnull stop ))block
Parameters
block |
The block to call on each object in the array. |
---|
Discussion
Enumerates the objects stored in the array.
Declared In
RBFragmentedArray.h
– enumerateObjectsWithOptions:usingBlock:
Enumerates the objects stored in the array.
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(nonnull void ( ^ ) ( id __nonnull obj , NSUInteger idx , BOOL *__nonnull stop ))block
Parameters
opts |
The enumeration options to use. |
---|---|
block |
The block to call on each object in the array. |
Discussion
Enumerates the objects stored in the array.
Declared In
RBFragmentedArray.h
– enumerateObjectRemovalUsingBlock:
Enumerates each object in the array for removal.
- (void)enumerateObjectRemovalUsingBlock:(nonnull BOOL ( ^ ) ( id __nonnull obj , NSUInteger idx , BOOL *__nonnull stop ))block
Parameters
block |
The block to call on each object, if the block returns true the object is removed. |
---|
Discussion
Enumerates each object in the array for removal.
Declared In
RBFragmentedArray.h