Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ / /

Interface OrderedCollectionChangeSet

On this page

  • io.realm
  • Nested Class Summary
  • Method Summary
  • Method Detail
  • getChangeRanges
  • getChanges
  • getDeletionRanges
  • getDeletions
  • getError
  • getInsertionRanges
  • getInsertions
  • getState

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.

Modifier and Type
Class and Description
public static final
public static
Modifier and Type
Method and Description
getChangeRanges ()

The modified ranges of objects in the new version of the collection.

public int

The modified indices in the new version of the collection.

The deleted ranges of objects in the previous version of the collection.

public int

The deleted indices in the previous version of the collection.

public Throwable

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.

Returns the state represented by this change.

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.

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.

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.

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.

Returns any error that happened. If an error has happened, the state of the collection and other changeset information is undefined. It is possible for a collection to go into an error state after being created and starting to send updates.

Returns

the error that happened.

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.

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.

Returns the state represented by this change. See State for a description of the different states a changeset can be in.

Returns

what kind of state is represented by this changeset.

Tip

See also:

  • State

Back

ObjectChangeSet