what-the-bank/sources/o/C14873gan.java

108 lines
3.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
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<T> implements Collection<T>, 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<? extends Object> collection) {
C14957gcv.e(collection, "");
Collection<? extends Object> collection2 = collection;
if (collection2.isEmpty()) {
return true;
}
Iterator<T> it = collection2.iterator();
while (it.hasNext()) {
if (!contains(it.next())) {
return false;
}
}
return true;
}
@Override // java.util.Collection, java.lang.Iterable
public final Iterator<T> 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> T[] toArray(T[] tArr) {
C14957gcv.e(tArr, "");
return (T[]) C14952gcq.d(this, tArr);
}
@Override // java.util.Collection
public final boolean retainAll(Collection<? extends Object> collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public final boolean removeAll(Collection<? extends Object> 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<? extends T> 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");
}
}