discord-jadx/app/src/main/java/d0/t/a.java

116 lines
3.6 KiB
Java

package d0.t;
import d0.z.d.g;
import d0.z.d.m;
import d0.z.d.o;
import java.util.Collection;
import java.util.Objects;
import kotlin.jvm.functions.Function1;
/* compiled from: AbstractCollection.kt */
public abstract class a<E> implements Collection<E>, d0.z.d.g0.a {
/* compiled from: AbstractCollection.kt */
/* renamed from: d0.t.a$a reason: collision with other inner class name */
public static final class C0292a extends o implements Function1<E, CharSequence> {
public final /* synthetic */ a this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public C0292a(a aVar) {
super(1);
this.this$0 = aVar;
}
@Override // kotlin.jvm.functions.Function1
public final CharSequence invoke(E e) {
return e == this.this$0 ? "(this Collection)" : String.valueOf(e);
}
}
@Override // java.util.Collection
public boolean add(E e) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean addAll(Collection<? extends E> 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, java.util.List
public boolean contains(Object obj) {
if (isEmpty()) {
return false;
}
for (E e : this) {
if (m.areEqual(e, obj)) {
return true;
}
}
return false;
}
@Override // java.util.Collection
public boolean containsAll(Collection<? extends Object> collection) {
m.checkNotNullParameter(collection, "elements");
if (collection.isEmpty()) {
return true;
}
for (Object obj : collection) {
if (!contains(obj)) {
return false;
}
}
return true;
}
public abstract int getSize();
@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<? 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 Object[] toArray() {
return g.toArray(this);
}
@Override // java.util.Collection
public <T> T[] toArray(T[] tArr) {
m.checkNotNullParameter(tArr, "array");
T[] tArr2 = (T[]) g.toArray(this, tArr);
Objects.requireNonNull(tArr2, "null cannot be cast to non-null type kotlin.Array<T>");
return tArr2;
}
@Override // java.lang.Object
public String toString() {
return u.joinToString$default(this, ", ", "[", "]", 0, null, new C0292a(this), 24, null);
}
}