package t8; import java.util.Collection; import java.util.Iterator; /* loaded from: classes2.dex */ public abstract class a implements Collection { /* renamed from: t8.a$a, reason: collision with other inner class name */ static final class C0234a extends d9.k implements c9.l { C0234a() { super(1); } @Override // c9.l /* renamed from: a, reason: merged with bridge method [inline-methods] */ public final CharSequence invoke(Object obj) { return obj == a.this ? "(this Collection)" : String.valueOf(obj); } } protected a() { } public abstract int a(); @Override // java.util.Collection public boolean add(Object obj) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public boolean addAll(Collection collection) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public void clear() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public boolean contains(Object obj) { if (isEmpty()) { return false; } Iterator it = iterator(); while (it.hasNext()) { if (d9.j.a(it.next(), obj)) { return true; } } return false; } @Override // java.util.Collection public boolean containsAll(Collection collection) { d9.j.e(collection, "elements"); Collection collection2 = collection; if (collection2.isEmpty()) { return true; } Iterator it = collection2.iterator(); while (it.hasNext()) { if (!contains(it.next())) { return false; } } return true; } @Override // java.util.Collection public boolean isEmpty() { return size() == 0; } @Override // java.util.Collection public boolean remove(Object obj) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public boolean removeAll(Collection collection) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public boolean retainAll(Collection collection) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public final /* bridge */ int size() { return a(); } @Override // java.util.Collection public Object[] toArray() { return d9.f.a(this); } public String toString() { String n10; n10 = u.n(this, ", ", "[", "]", 0, null, new C0234a(), 24, null); return n10; } @Override // java.util.Collection public Object[] toArray(Object[] objArr) { d9.j.e(objArr, "array"); Object[] b10 = d9.f.b(this, objArr); d9.j.c(b10, "null cannot be cast to non-null type kotlin.Array"); return b10; } }