Package io.realm

Class CollectionUtils


  • public class CollectionUtils
    extends Object
    • Constructor Detail

      • CollectionUtils

        public CollectionUtils()
    • Method Detail

      • copyToRealm

        public static <E extends RealmModel> E copyToRealm​(io.realm.BaseRealm baseRealm,
                                                           E object)
        Called by both list and dictionary operators to copy a RealmModel to Realm in case it has been deemed necessary.
        Type Parameters:
        E - The RealmModel type.
        Parameters:
        baseRealm - The Realm instance to copy the object to.
        object - The object to copy.
        Returns:
        the copied object
      • checkForAddRemoveListener

        public static void checkForAddRemoveListener​(io.realm.BaseRealm baseRealm,
                                                     @Nullable
                                                     Object listener,
                                                     boolean checkListener)
        Checks whether it is possible to add or remove a provided listener.
        Parameters:
        listener - The listener to be checked.
        checkListener - whether the check should be performed.