# IGListIndexSetResult

    @interface IGListIndexSetResult : NSObject

A result object returned when diffing with indexes.

- `inserts`

  The indexes inserted into the new collection.

  #### Declaration

  Objective-C

      @property (readonly, strong, nonatomic) NSIndexSet *_Nonnull inserts;

  Swift

      var inserts: IndexSet { get }

- `deletes`

  The indexes deleted from the old collection.

  #### Declaration

  Objective-C

      @property (readonly, strong, nonatomic) NSIndexSet *_Nonnull deletes;

  Swift

      var deletes: IndexSet { get }

- `updates`

  The indexes in the new collection that need updated.

  #### Declaration

  Objective-C

      @property (readonly, strong, nonatomic) NSIndexSet *_Nonnull updates;

  Swift

      var updates: IndexSet { get }

- `moves`

  The moves from an index in the old collection to an index in the new collection.

  #### Declaration

  Objective-C

      @property (readonly, copy, nonatomic) NSArray<IGListMoveIndex *> *_Nonnull moves;

  Swift

      var moves: [Any] { get }

- `-hasChanges`

  Returns whether the result has any changes or not.

  #### Declaration

  Objective-C

      - (BOOL)hasChanges;

  Swift

      func hasChanges() -> Bool

  #### Return Value

  `YES` if the result has changes, `NO` otherwise.

- `-oldIndexForIdentifier:`

  Returns the index of the object with the specified identifier before the diff.

  See

  `-[IGListDiffable diffIdentifier]`.

  #### Declaration

  Objective-C

      - (NSInteger)oldIndexForIdentifier:(nonnull id<NSObject>)identifier;

  Swift

      func oldIndex(forIdentifier identifier: NSObjectProtocol) -> Int

  #### Parameters

  `identifier` | The diff identifier of the object.

  #### Return Value

  The index of the object before the diff, or `NSNotFound`.

- `-newIndexForIdentifier:`

  Returns the index of the object with the specified identifier after the diff.

  See

  `-[IGListDiffable diffIdentifier]`.

  #### Declaration

  Objective-C

      - (NSInteger)newIndexForIdentifier:(nonnull id<NSObject>)identifier;

  Swift

      func newIndex(forIdentifier identifier: NSObjectProtocol) -> Int

  #### Parameters

  `identifier` | The diff identifier of the object.

  #### Return Value

  The index path of the object after the diff, or `NSNotFound`.

- `-resultForBatchUpdates`

  Creates a new result object with operations safe for use in `UITableView` and `UICollectionView` batch updates.

  #### Declaration

  Objective-C

      - (nonnull IGListIndexSetResult *)resultForBatchUpdates;

  Swift

      func forBatchUpdates() -> IGListIndexSetResult

© 2017 Instagram. All rights reserved. (Last updated: 2017-01-04)

Generated by jazzy ♪♫ v0.7.3, a Realm project.