Interface OrderedCollectionChangeSet
On this page
io.realm
This interface describes the changes made to a collection during the last update.:ref:OrderedCollectionChangeSet <io_realm_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 Range s.
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
public static final | |
public static |
Method Summary
Modifier and Type | Method and Description |
---|---|
The modified ranges of objects in the new version of the collection. | |
public int | getChanges () The modified indices in the new version of the collection. |
The deleted ranges of objects in the previous version of the collection. | |
public int | getDeletions () The deleted indices in the previous version of the collection. |
public Throwable | getError () Returns any error that happened. |
The inserted ranges of objects in the new version of the collection. | |
public int | The inserted indices in the new version of the collection. |
getState () Returns the state represented by this change. |
Method Detail
getChangeRanges
The modified ranges of objects in the new version of the collection. Returns the Range array. A zero-sized array will be returned if no objects were modified. |
getChanges
public int getChanges () |
---|
The modified indices in the new version of the collection.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). Returns the indices array. A zero-sized array will be returned if objects were modified. |
getDeletionRanges
The deleted ranges of objects in the previous version of the collection. Returns the Range array. A zero-sized array will be returned if no objects were deleted. |
getDeletions
public int getDeletions () |
---|
The deleted indices in the previous version of the collection. Returns the indices array. A zero-sized array will be returned if no objects were deleted. |
getError
getInsertionRanges
The inserted ranges of objects in the new version of the collection. Returns the Range array. A zero-sized array will be returned if no objects were inserted. |
getInsertions
public int getInsertions () |
---|
The inserted indices in the new version of the collection. Returns the indices array. A zero-sized array will be returned if no objects were inserted. |
getState
public OrderedCollectionChangeSet.State getState () |
---|