package com.facetec.sdk; import java.io.IOException; import java.lang.reflect.Type; import java.util.Collection; import java.util.Iterator; /* loaded from: classes.dex */ public final class ff implements en { private final eq e; public ff(eq eqVar) { this.e = eqVar; } @Override // com.facetec.sdk.en public final ek e(dx dxVar, fv fvVar) { Type b = fvVar.b(); Class a = fvVar.a(); if (!Collection.class.isAssignableFrom(a)) { return null; } Type c = et.c(b, (Class) a); return new e(dxVar, c, dxVar.d(fv.b(c)), this.e.d(fvVar)); } /* loaded from: classes.dex */ static final class e extends ek> { private final ek a; private final fc> e; @Override // com.facetec.sdk.ek public final /* synthetic */ void b(ga gaVar, Object obj) throws IOException { Collection collection = (Collection) obj; if (collection == null) { gaVar.h(); return; } gaVar.e(); Iterator it = collection.iterator(); while (it.hasNext()) { this.a.b(gaVar, it.next()); } gaVar.b(); } public e(dx dxVar, Type type, ek ekVar, fc> fcVar) { this.a = new fq(dxVar, ekVar, type); this.e = fcVar; } @Override // com.facetec.sdk.ek public final /* synthetic */ Object a(fu fuVar) throws IOException { if (fuVar.i() == gc.NULL) { fuVar.l(); return null; } Collection c = this.e.c(); fuVar.a(); while (fuVar.e()) { c.add(this.a.a(fuVar)); } fuVar.c(); return c; } } }