Package io.realm.rx

Class ObjectChange<E extends RealmModel>

    • Constructor Detail

      • ObjectChange

        public ObjectChange​(E object,
                            ObjectChangeSet changeset)
        Constructor for a ObjectChange.
        object - the object that was updated.
        changeset - the changeset describing the update.
    • Method Detail

      • getObject

        public E getObject()
      • getChangeset

        public ObjectChangeSet getChangeset()
        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.
      • hashCode

        public int hashCode()
        hashCode in class Object