Docs Menu

Docs HomeRealm

Class ObjectChange

On this page

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

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.


  • object - the object that was updated.

  • changeset - the changeset describing the update.

public boolean equals (


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
.subscribe(new Consumer<ObjectChange>() {
public void accept(ObjectChange item) throws Exception {
item.getChangeset(); // Will return null the first two times


the changeset describing how the object was updated.

public E getObject ()

public int hashCode ()


hashCode in class Object

public String toString ()


toString in class Object

←  Class CollectionChangeClass RealmObservableFactory →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.