package t8; import java.util.Collection; import java.util.Iterator; /* loaded from: classes2.dex */ abstract class r extends q { public static boolean i(Collection collection, Iterable iterable) { d9.j.e(collection, ""); d9.j.e(iterable, "elements"); if (iterable instanceof Collection) { return collection.addAll((Collection) iterable); } Iterator it = iterable.iterator(); boolean z10 = false; while (it.hasNext()) { if (collection.add(it.next())) { z10 = true; } } return z10; } }