package o; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; /* loaded from: classes.dex */ public class gdL extends C14965gdK { /* JADX INFO: Add missing generic type declarations: [T] */ /* loaded from: classes.dex */ public static final class LWm implements Iterable, InterfaceC14932gcO { private gdE a; public LWm(gdE gde) { this.a = gde; } @Override // java.lang.Iterable public final Iterator iterator() { return this.a.e(); } } /* JADX INFO: Add missing generic type declarations: [T] */ /* loaded from: classes.dex */ public static final class IeS implements gdE { private gdE b; private Comparator d; /* JADX WARN: Multi-variable type inference failed */ public IeS(gdE gde, Comparator comparator) { this.b = gde; this.d = comparator; } @Override // o.gdE public final Iterator e() { gdE gde = this.b; C14957gcv.e(gde, ""); List list = (List) C14964gdG.e(gde, new ArrayList()); Comparator comparator = this.d; C14957gcv.e(list, ""); C14957gcv.e(comparator, ""); if (list.size() > 1) { Collections.sort(list, comparator); } return list.iterator(); } } public static final > C e(gdE gde, C c) { C14957gcv.e(gde, ""); C14957gcv.e(c, ""); Iterator e = gde.e(); while (e.hasNext()) { c.add(e.next()); } return c; } public static final List e(gdE gde) { C14957gcv.e(gde, ""); C14957gcv.e(gde, ""); return C14881gav.a((List) C14964gdG.e(gde, new ArrayList())); } /* JADX INFO: Add missing generic type declarations: [T] */ /* loaded from: classes.dex */ public static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR { public static final HBt e = new HBt(); @Override // o.InterfaceC14894gbR public final /* synthetic */ Boolean invoke(Object obj) { return Boolean.valueOf(obj == null); } HBt() { super(1); } } public static final String e(gdE gde, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, CharSequence charSequence4) { C14957gcv.e(gde, ""); C14957gcv.e(charSequence, ""); C14957gcv.e(charSequence2, ""); C14957gcv.e(charSequence3, ""); C14957gcv.e(charSequence4, ""); StringBuilder sb = new StringBuilder(); C14957gcv.e(gde, ""); C14957gcv.e(sb, ""); C14957gcv.e(charSequence, ""); C14957gcv.e(charSequence2, ""); C14957gcv.e(charSequence3, ""); C14957gcv.e(charSequence4, ""); sb.append(charSequence2); Iterator e = gde.e(); int i = 0; while (e.hasNext()) { T next = e.next(); i++; if (i > 1) { sb.append(charSequence); } gdZ.e(sb, next, (InterfaceC14894gbR) null); } sb.append(charSequence3); String obj = sb.toString(); C14957gcv.c((Object) obj, ""); return obj; } public static final gdE e(gdE gde, int i) { C14957gcv.e(gde, ""); if (i >= 0) { if (i == 0) { return C14992gdx.c; } return gde instanceof gdA ? ((gdA) gde).d(i) : new gdJ(gde, i); } StringBuilder sb = new StringBuilder("Requested element count "); sb.append(i); sb.append(" is less than zero."); throw new IllegalArgumentException(sb.toString().toString()); } /* JADX INFO: Add missing generic type declarations: [T] */ /* loaded from: classes.dex */ public static final class RVV extends AbstractC14961gcz implements InterfaceC14894gbR { public static final RVV b = new RVV(); @Override // o.InterfaceC14894gbR public final T invoke(T t) { return t; } RVV() { super(1); } } }