package o; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; /* renamed from: o.gan, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public final class C14873gan implements Collection, InterfaceC14932gcO { private final T[] a; private final boolean d; public C14873gan(T[] tArr, boolean z) { C14957gcv.e(tArr, ""); this.a = tArr; this.d = z; } @Override // java.util.Collection public final /* bridge */ int size() { return this.a.length; } @Override // java.util.Collection public final boolean isEmpty() { return this.a.length == 0; } @Override // java.util.Collection public final boolean contains(Object obj) { T[] tArr = this.a; C14957gcv.e(tArr, ""); return C14875gap.d(tArr, obj) >= 0; } @Override // java.util.Collection public final boolean containsAll(Collection collection) { C14957gcv.e(collection, ""); 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, java.lang.Iterable public final Iterator iterator() { T[] tArr = this.a; C14957gcv.e(tArr, ""); return new C14947gcl(tArr); } @Override // java.util.Collection public final Object[] toArray() { T[] tArr = this.a; boolean z = this.d; C14957gcv.e(tArr, ""); if (z && C14957gcv.b(tArr.getClass(), Object[].class)) { return tArr; } Object[] copyOf = Arrays.copyOf(tArr, tArr.length, Object[].class); C14957gcv.c(copyOf, ""); return copyOf; } @Override // java.util.Collection public final T[] toArray(T[] tArr) { C14957gcv.e(tArr, ""); return (T[]) C14952gcq.d(this, tArr); } @Override // java.util.Collection public final boolean retainAll(Collection collection) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public final boolean removeAll(Collection collection) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public final boolean remove(Object obj) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public final void clear() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public final boolean addAll(Collection collection) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } @Override // java.util.Collection public final boolean add(T t) { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } }