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

Class ObjectChange

On this page

  • io.realm.rx
  • Constructors
  • Method Summary
  • Inherited Methods
  • Constructor Detail
  • Method Detail
  • equals
  • getChangeset
  • getObject
  • hashCode
  • toString
java.lang.Object
io.realm.rx.ObjectChange

Container wrapping the result of a io.realm.RealmObjectChangeListener being triggered.

This is used by RealmObject.asChangesetObservable() and RealmObject.asChangesetObservable(RealmModel) as RxJava is only capable of emitting one item, not multiple.

Constructor and Description
E object,
ObjectChangeSet changeset
)

Constructor for a ObjectChange.

Modifier and Type
Method and Description
public boolean

Returns the changeset describing the update.

public E
public int
public String
  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

public ObjectChange (
E object,
ObjectChangeSet changeset
)

Constructor for a ObjectChange.

Parameters

  • object - the object that was updated.

  • changeset - the changeset describing the update.

public boolean equals (
)

Overrides

equals in class Object

Returns the changeset describing the update.This will be null the first time the stream emits the object as well as when a asynchronous query is loaded for the first time.

// Example
realm.where(Person.class).findFirstAsync().asChangesetObservable()
.subscribe(new Consumer<ObjectChange>() {
@Override
public void accept(ObjectChange item) throws Exception {
item.getChangeset(); // Will return null the first two times
}
});

Returns

the changeset describing how the object was updated.

public E getObject ()

public int hashCode ()

Overrides

hashCode in class Object

public String toString ()

Overrides

toString in class Object

Back

CollectionChange