CollectionDifference.Change

enum Change

A single change to a collection.

Cases

case insert Required

An insertion.

The offset value is the offset of the inserted element in the final state of the collection after the difference is fully applied. A non-nil associatedWith value is the offset of the complementary change.

Declaration

case insert(offset: Int, element: ChangeElement, associatedWith: Int?)
case remove Required

A removal.

The offset value is the offset of the element to be removed in the original state of the collection. A non-nil associatedWith value is the offset of the complementary change.

Declaration

case remove(offset: Int, element: ChangeElement, associatedWith: Int?)