Package io.realm.rx

Class CollectionChange<E extends OrderedRealmCollection>

    • Constructor Detail

      • CollectionChange

        public CollectionChange​(E collection,
                                OrderedCollectionChangeSet changeset)
        Constructor for a CollectionChange.
        collection - the collection that changed.
        changeset - the changeset describing the change.
    • Method Detail

      • getCollection

        public E getCollection()
        Returns the collection that was updated.
        collection that was updated.
      • getChangeset

        public OrderedCollectionChangeSet getChangeset()
        Returns the changeset describing the update.

        This will be null the first time the stream emits the collection as well as when a asynchronous query is loaded for the first time.

         // Example
           .subscribe(new Consumer<CollectionChange>() {
             public void accept(CollectionChange item) throws Exception {
               item.getChangeset(); // Will return null the first two times
        the changeset describing how the collection was updated.
      • hashCode

        public int hashCode()
        hashCode in class Object