Added Documentation
This commit is contained in:
@@ -8,48 +8,53 @@
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
@category NSIndexPath (MPAdditions)
|
||||
@abstract This category adds some methods for working with index paths to
|
||||
the <code>NSIndexPath</code> class.
|
||||
*/
|
||||
@interface NSIndexPath (MPAdditions)
|
||||
|
||||
|
||||
/*!
|
||||
@property firstIndex
|
||||
@brief The first index from the index path.
|
||||
@abstract The first index from the receiver.
|
||||
|
||||
@discussion If the index path is empty @c NSNotFound is returned.
|
||||
@discussion If the receiver is empty <code>NSNotFound</code> is returned.
|
||||
*/
|
||||
@property (readonly, nonatomic) NSUInteger firstIndex;
|
||||
|
||||
|
||||
/*!
|
||||
@property lastIndex
|
||||
@brief The last index from the index path.
|
||||
@abstract The last index from the receiver.
|
||||
|
||||
@discussion If the index path is empty @c NSNotFound is returned.
|
||||
@discussion If the receiver is empty <code>NSNotFound</code> is returned.
|
||||
*/
|
||||
@property (readonly, nonatomic) NSUInteger lastIndex;
|
||||
|
||||
|
||||
/*!
|
||||
@method indexPathByReplacingLastIndexWithIndex:
|
||||
@brief Provides an index path with the index in the receiving index path
|
||||
where the last one is replaced by @c index.
|
||||
@abstract Provides an index path with the indexes of the receiver where the
|
||||
last one is replaced by <code>anIndex</code>.
|
||||
|
||||
@discussion If the receiving index path is empty an index path of length @c 1
|
||||
is returned. The last index in the returned index path is @c
|
||||
index.
|
||||
@discussion If the receiver is empty an index path of length <code>1</code>
|
||||
is returned. The last index in the returned index path is
|
||||
<code>anIndex</code>.
|
||||
|
||||
@param index
|
||||
@param anIndex
|
||||
The index with which to replace the last index in the receiving
|
||||
index path.
|
||||
|
||||
@return A new index path with @c index as its last index.
|
||||
@return A new index path with <code>anIndex</code> as its last index.
|
||||
*/
|
||||
- (NSIndexPath *)indexPathByReplacingLastIndexWithIndex:(NSUInteger)index;
|
||||
- (NSIndexPath *)indexPathByReplacingLastIndexWithIndex:(NSUInteger)anIndex;
|
||||
|
||||
|
||||
/*!
|
||||
@method indexPathByRemovingFirstIndex
|
||||
@brief Provides an index path with the indexes in the receiving index
|
||||
@abstract Provides an index path with the indexes in the receiving index
|
||||
path, excluding the first one.
|
||||
|
||||
@discussion Returns an empty NSIndexPath instance if the receiving index
|
||||
@@ -63,90 +68,90 @@
|
||||
|
||||
/*!
|
||||
@method indexPathByPreceedingIndex:
|
||||
@brief Provides an index path with the specified index followed by the
|
||||
@abstract Provides an index path with the specified index followed by the
|
||||
indexes of the receiver.
|
||||
|
||||
@discussion If the receiver does not contain any indexes the specified index
|
||||
is the only index contained in the returned index path.
|
||||
|
||||
@param index
|
||||
@param anIndex
|
||||
The index new index preceeding all others
|
||||
|
||||
@return A new index path with all the receiver's indexes preceeded by @c
|
||||
index.
|
||||
@return A new index path with all the receiver's indexes preceeded by
|
||||
<code>anIndex</code>
|
||||
*/
|
||||
- (NSIndexPath *)indexPathByPreceedingIndex:(NSUInteger)index;
|
||||
- (NSIndexPath *)indexPathByPreceedingIndex:(NSUInteger)anIndex;
|
||||
|
||||
|
||||
/*!
|
||||
@method indexPathByIncrementingLastIndex
|
||||
@brief Provides an index path with the indexes in the receiving index
|
||||
path where the last one is incremented by @c 1.
|
||||
@abstract Provides an index path with the indexes in the receiving index
|
||||
path where the last one is incremented by <code>1</code>.
|
||||
|
||||
@discussion If the receiver does not contain any indexes an empty index path
|
||||
is returned.
|
||||
|
||||
@return A new index path with all the receiver's indexes and the last one
|
||||
incremented by @c 1.
|
||||
incremented by <code>1</code>.
|
||||
*/
|
||||
- (NSIndexPath *)indexPathByIncrementingLastIndex;
|
||||
|
||||
|
||||
/*!
|
||||
@method indexPathByDecrementingLastIndex
|
||||
@brief Provides an index path with the indexes in the receiving index
|
||||
path where the last one is decremented by @c 1.
|
||||
@abstract Provides an index path with the indexes in the receiving index
|
||||
path where the last one is decremented by <code>1</code>.
|
||||
|
||||
@discussion If the receiver does not contain any indexes an empty index path
|
||||
is returned.
|
||||
|
||||
@return A new index path with all the receiver's indexes and the last one
|
||||
decremented by @c 1.
|
||||
decremented by <code>1</code>.
|
||||
*/
|
||||
- (NSIndexPath *)indexPathByDecrementingLastIndex;
|
||||
|
||||
|
||||
/*!
|
||||
@method indexPathByRemovingIndexesFrom:
|
||||
@brief Provides an index path with the indexes in the recieving index
|
||||
@abstract Provides an index path with the indexes in the recieving index
|
||||
path up to the index at the specified position.
|
||||
|
||||
@discussion If @c from is greater or equal to the number of indexes in the
|
||||
receiving index path only the indexes to the end of the receiver
|
||||
are removed.
|
||||
@discussion If <code>from</code> is greater or equal to the number of indexes
|
||||
in the receiving index path only the indexes to the end of the
|
||||
receiver are removed.
|
||||
|
||||
@param from
|
||||
The position of the first index to be excluded in the returned
|
||||
index path.
|
||||
|
||||
@return An index path with all indexes from the receiver up to position
|
||||
@c from.
|
||||
<code>from</code>.
|
||||
*/
|
||||
- (NSIndexPath *)indexPathByRemovingIndexesFrom:(NSUInteger)from;
|
||||
|
||||
|
||||
/*!
|
||||
@method indexPathByRemovingIndexesTo:
|
||||
@brief Provides an index path with the indexes in the receiving index
|
||||
@abstract Provides an index path with the indexes in the receiving index
|
||||
path where the first indexes are removed.
|
||||
|
||||
|
||||
@discussion @c to specifies the number of indexes to be removed from the
|
||||
front. Thus the index at position @c to will be included in the
|
||||
returned index path.
|
||||
@discussion <code>to</code> specifies the number of indexes to be removed
|
||||
from the front. Thus the index at position <code>to</code> will
|
||||
be included in the returned index path.
|
||||
|
||||
@param to
|
||||
The number of indexes to remove from the front.
|
||||
|
||||
@return A new index path with all the receiver's indexes exept the first
|
||||
@c to ones.
|
||||
<code>to</code> ones.
|
||||
*/
|
||||
- (NSIndexPath *)indexPathByRemovingIndexesTo:(NSUInteger)to;
|
||||
|
||||
|
||||
/*!
|
||||
@method commonIndexPathWith:
|
||||
@brief Provides an index path that contains the first indexes of the
|
||||
@abstract Provides an index path that contains the first indexes of the
|
||||
receiver that are equal to the specified index path.
|
||||
|
||||
@discussion If one index path is completely included in the other a new index
|
||||
@@ -156,7 +161,7 @@
|
||||
The index path to compare the receiver against.
|
||||
|
||||
@return A new index path with the first indexes of the receiver that are
|
||||
also present in @c indexPath.
|
||||
also present in <code>indexPath</code>.
|
||||
*/
|
||||
- (NSIndexPath *)commonIndexPathWith:(NSIndexPath *)indexPath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user