Package io.realm
Class CollectionUtils
- java.lang.Object
-
- io.realm.CollectionUtils
-
public class CollectionUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description CollectionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkForAddRemoveListener(io.realm.BaseRealm baseRealm, Object listener, boolean checkListener)
Checks whether it is possible to add or remove a provided listener.static <E extends RealmModel>
EcopyToRealm(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.
-
-
-
Field Detail
-
LIST_TYPE
public static final String LIST_TYPE
- See Also:
- Constant Field Values
-
DICTIONARY_TYPE
public static final String DICTIONARY_TYPE
- See Also:
- Constant Field Values
-
SET_TYPE
public static final String SET_TYPE
- See Also:
- Constant Field Values
-
-
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.
-
-