Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Código para convertir una colección a una colección de Realm (RealmList)
import java.util.Collection;
import io.realm.RealmList;
import io.realm.RealmModel;
public class RealmCollectionHelper {
public static <C extends RealmModel> RealmList<C> mapperCollectionToRealmList(Collection<C> objects){
if (objects == null){
return null;
}
RealmList<C> realmList = new RealmList<>();
realmList.addAll(objects);
return realmList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.