discord-jadx/app/src/main/java/d0/t/g.java
2021-06-27 22:44:35 +02:00

97 lines
2.8 KiB
Java

package d0.t;
import d0.z.d.c;
import d0.z.d.g0.a;
import d0.z.d.m;
import java.util.Collection;
import java.util.Iterator;
/* compiled from: Collections.kt */
public final class g<T> implements Collection<T>, a {
public final T[] i;
public final boolean j;
public g(T[] tArr, boolean z2) {
m.checkNotNullParameter(tArr, "values");
this.i = tArr;
this.j = z2;
}
@Override // java.util.Collection
public boolean add(T t) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean addAll(Collection<? extends T> 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) {
return k.contains(this.i, obj);
}
@Override // java.util.Collection
public boolean containsAll(Collection<? extends Object> collection) {
m.checkNotNullParameter(collection, "elements");
if (collection.isEmpty()) {
return true;
}
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
if (!contains(it.next())) {
return false;
}
}
return true;
}
public int getSize() {
return this.i.length;
}
@Override // java.util.Collection
public boolean isEmpty() {
return this.i.length == 0;
}
@Override // java.util.Collection, java.lang.Iterable
public Iterator<T> iterator() {
return c.iterator(this.i);
}
@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<? extends Object> collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean retainAll(Collection<? extends Object> collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public final /* bridge */ int size() {
return getSize();
}
@Override // java.util.Collection
public final Object[] toArray() {
return m.copyToArrayOfAny(this.i, this.j);
}
@Override // java.util.Collection
public <T> T[] toArray(T[] tArr) {
return (T[]) d0.z.d.g.toArray(this, tArr);
}
}