283 lines
8.6 KiB
Java
283 lines
8.6 KiB
Java
package o;
|
|
|
|
import java.util.Collection;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.ListIterator;
|
|
import java.util.NoSuchElementException;
|
|
import java.util.RandomAccess;
|
|
|
|
/* renamed from: o.gam, reason: case insensitive filesystem */
|
|
/* loaded from: classes.dex */
|
|
public abstract class AbstractC14872gam<E> extends AbstractC14868gai<E> implements List<E> {
|
|
public static final Sts b = new Sts(0);
|
|
|
|
@Override // java.util.List
|
|
public abstract E get(int i);
|
|
|
|
@Override // java.util.Collection, java.lang.Iterable, java.util.List
|
|
public Iterator<E> iterator() {
|
|
return new RVV(this);
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public int indexOf(E e) {
|
|
Iterator<E> it = iterator();
|
|
int i = 0;
|
|
while (it.hasNext()) {
|
|
if (C14957gcv.b(it.next(), e)) {
|
|
return i;
|
|
}
|
|
i++;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public int lastIndexOf(E e) {
|
|
AbstractC14872gam<E> abstractC14872gam = this;
|
|
ListIterator<E> listIterator = abstractC14872gam.listIterator(abstractC14872gam.size());
|
|
while (listIterator.hasPrevious()) {
|
|
if (C14957gcv.b(listIterator.previous(), e)) {
|
|
return listIterator.nextIndex();
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public ListIterator<E> listIterator() {
|
|
return new LWm(this, 0);
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public ListIterator<E> listIterator(int i) {
|
|
return new LWm(this, i);
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public List<E> subList(int i, int i2) {
|
|
return new IeS(this, i, i2);
|
|
}
|
|
|
|
/* renamed from: o.gam$IeS */
|
|
/* loaded from: classes.dex */
|
|
static final class IeS<E> extends AbstractC14872gam<E> implements RandomAccess {
|
|
private int a;
|
|
private final AbstractC14872gam<E> c;
|
|
private final int e;
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public IeS(AbstractC14872gam<? extends E> abstractC14872gam, int i, int i2) {
|
|
C14957gcv.e(abstractC14872gam, "");
|
|
this.c = abstractC14872gam;
|
|
this.e = i;
|
|
int size = abstractC14872gam.size();
|
|
if (i < 0 || i2 > size) {
|
|
StringBuilder sb = new StringBuilder("fromIndex: ");
|
|
sb.append(i);
|
|
sb.append(", toIndex: ");
|
|
sb.append(i2);
|
|
sb.append(", size: ");
|
|
sb.append(size);
|
|
throw new IndexOutOfBoundsException(sb.toString());
|
|
}
|
|
if (i <= i2) {
|
|
this.a = i2 - i;
|
|
return;
|
|
}
|
|
StringBuilder sb2 = new StringBuilder("fromIndex: ");
|
|
sb2.append(i);
|
|
sb2.append(" > toIndex: ");
|
|
sb2.append(i2);
|
|
throw new IllegalArgumentException(sb2.toString());
|
|
}
|
|
|
|
@Override // o.AbstractC14872gam, java.util.List
|
|
public final E get(int i) {
|
|
int i2 = this.a;
|
|
if (i >= 0 && i < i2) {
|
|
return this.c.get(this.e + i);
|
|
}
|
|
StringBuilder sb = new StringBuilder("index: ");
|
|
sb.append(i);
|
|
sb.append(", size: ");
|
|
sb.append(i2);
|
|
throw new IndexOutOfBoundsException(sb.toString());
|
|
}
|
|
|
|
@Override // o.AbstractC14868gai
|
|
public final int d() {
|
|
return this.a;
|
|
}
|
|
}
|
|
|
|
@Override // java.util.Collection, java.util.List
|
|
public boolean equals(Object obj) {
|
|
if (obj == this) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof List)) {
|
|
return false;
|
|
}
|
|
AbstractC14872gam<E> abstractC14872gam = this;
|
|
Collection collection = (Collection) obj;
|
|
C14957gcv.e(abstractC14872gam, "");
|
|
C14957gcv.e(collection, "");
|
|
if (abstractC14872gam.size() != collection.size()) {
|
|
return false;
|
|
}
|
|
Iterator<E> it = collection.iterator();
|
|
Iterator<E> it2 = abstractC14872gam.iterator();
|
|
while (it2.hasNext()) {
|
|
if (!C14957gcv.b(it2.next(), it.next())) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override // java.util.Collection, java.util.List
|
|
public int hashCode() {
|
|
AbstractC14872gam<E> abstractC14872gam = this;
|
|
C14957gcv.e(abstractC14872gam, "");
|
|
Iterator<E> it = abstractC14872gam.iterator();
|
|
int i = 1;
|
|
while (it.hasNext()) {
|
|
E next = it.next();
|
|
i = (i * 31) + (next != null ? next.hashCode() : 0);
|
|
}
|
|
return i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* renamed from: o.gam$RVV */
|
|
/* loaded from: classes.dex */
|
|
public class RVV implements Iterator<E>, InterfaceC14932gcO {
|
|
private int d;
|
|
private AbstractC14872gam<E> e;
|
|
|
|
public RVV(AbstractC14872gam abstractC14872gam) {
|
|
this.e = abstractC14872gam;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
return this.d < this.e.size();
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public E next() {
|
|
if (!hasNext()) {
|
|
throw new NoSuchElementException();
|
|
}
|
|
AbstractC14872gam<E> abstractC14872gam = this.e;
|
|
int i = this.d;
|
|
this.d = i + 1;
|
|
return abstractC14872gam.get(i);
|
|
}
|
|
|
|
protected final void a(int i) {
|
|
this.d = i;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public void remove() {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
|
|
protected final int a() {
|
|
return this.d;
|
|
}
|
|
}
|
|
|
|
/* renamed from: o.gam$LWm */
|
|
/* loaded from: classes.dex */
|
|
class LWm extends RVV implements ListIterator {
|
|
private AbstractC14872gam<E> e;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public LWm(AbstractC14872gam abstractC14872gam, int i) {
|
|
super(abstractC14872gam);
|
|
this.e = abstractC14872gam;
|
|
Sts sts = AbstractC14872gam.b;
|
|
int size = abstractC14872gam.size();
|
|
if (i >= 0 && i <= size) {
|
|
a(i);
|
|
return;
|
|
}
|
|
StringBuilder sb = new StringBuilder("index: ");
|
|
sb.append(i);
|
|
sb.append(", size: ");
|
|
sb.append(size);
|
|
throw new IndexOutOfBoundsException(sb.toString());
|
|
}
|
|
|
|
@Override // java.util.ListIterator
|
|
public final boolean hasPrevious() {
|
|
return a() > 0;
|
|
}
|
|
|
|
@Override // java.util.ListIterator
|
|
public final int nextIndex() {
|
|
return a();
|
|
}
|
|
|
|
@Override // java.util.ListIterator
|
|
public final E previous() {
|
|
if (!hasPrevious()) {
|
|
throw new NoSuchElementException();
|
|
}
|
|
AbstractC14872gam<E> abstractC14872gam = this.e;
|
|
a(a() - 1);
|
|
return abstractC14872gam.get(a());
|
|
}
|
|
|
|
@Override // java.util.ListIterator
|
|
public final int previousIndex() {
|
|
return a() - 1;
|
|
}
|
|
|
|
@Override // java.util.ListIterator
|
|
public final void set(E e) {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
|
|
@Override // java.util.ListIterator
|
|
public final void add(E e) {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
}
|
|
|
|
/* renamed from: o.gam$Sts */
|
|
/* loaded from: classes.dex */
|
|
public static final class Sts {
|
|
private Sts() {
|
|
}
|
|
|
|
public /* synthetic */ Sts(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public E set(int i, E e) {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public E remove(int i) {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public boolean addAll(int i, Collection<? extends E> collection) {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
|
|
@Override // java.util.List
|
|
public void add(int i, E e) {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
}
|