public interface OrderedCollectionChangeSet
OrderedCollectionChangeSet
is passed to the OrderedRealmCollectionChangeListener
which is registered
by RealmResults.addChangeListener(OrderedRealmCollectionChangeListener)
.
The change information is available in two formats: a simple array of row indices in the collection for each type of
change, or an array of OrderedCollectionChangeSet.Range
s.
Modifier and Type | Interface and Description |
---|---|
static class |
OrderedCollectionChangeSet.Range |
Modifier and Type | Method and Description |
---|---|
OrderedCollectionChangeSet.Range[] |
getChangeRanges()
The modified ranges of objects in the new version of the collection.
|
int[] |
getChanges()
The modified indices in the new version of the collection.
|
OrderedCollectionChangeSet.Range[] |
getDeletionRanges()
The deleted ranges of objects in the previous version of the collection.
|
int[] |
getDeletions()
The deleted indices in the previous version of the collection.
|
OrderedCollectionChangeSet.Range[] |
getInsertionRanges()
The inserted ranges of objects in the new version of the collection.
|
int[] |
getInsertions()
The inserted indices in the new version of the collection.
|
int[] getDeletions()
int[] getInsertions()
int[] getChanges()
For RealmResults
, this means that one or more of the properties of the object at the given index were
modified (or an object linked to by that object was modified).
OrderedCollectionChangeSet.Range[] getDeletionRanges()
OrderedCollectionChangeSet.Range
array. A zero-sized array will be returned if no objects were deleted.OrderedCollectionChangeSet.Range[] getInsertionRanges()
OrderedCollectionChangeSet.Range
array. A zero-sized array will be returned if no objects were inserted.OrderedCollectionChangeSet.Range[] getChangeRanges()
OrderedCollectionChangeSet.Range
array. A zero-sized array will be returned if no objects were modified.