66 lines
2.3 KiB
Java
66 lines
2.3 KiB
Java
|
package com.google.android.libraries.places.internal;
|
||
|
|
||
|
import com.google.android.libraries.places.internal.zzadp;
|
||
|
import com.google.android.libraries.places.internal.zzadq;
|
||
|
import java.io.IOException;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public abstract class zzadq<MessageType extends zzadq<MessageType, BuilderType>, BuilderType extends zzadp<MessageType, BuilderType>> implements zzagg {
|
||
|
protected int zza = 0;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
public static void zzM(Iterable iterable, List list) {
|
||
|
zzafh.zze(iterable);
|
||
|
if (list instanceof ArrayList) {
|
||
|
((ArrayList) list).ensureCapacity(list.size() + iterable.size());
|
||
|
}
|
||
|
int size = list.size();
|
||
|
for (Object obj : iterable) {
|
||
|
if (obj != null) {
|
||
|
list.add(obj);
|
||
|
} else {
|
||
|
int size2 = list.size();
|
||
|
StringBuilder sb = new StringBuilder("Element at index ");
|
||
|
sb.append(size2 - size);
|
||
|
sb.append(" is null.");
|
||
|
String obj2 = sb.toString();
|
||
|
int size3 = list.size();
|
||
|
while (true) {
|
||
|
size3--;
|
||
|
if (size3 < size) {
|
||
|
break;
|
||
|
} else {
|
||
|
list.remove(size3);
|
||
|
}
|
||
|
}
|
||
|
throw new NullPointerException(obj2);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.libraries.places.internal.zzagg
|
||
|
public final zzaed zzs() {
|
||
|
try {
|
||
|
byte[] bArr = new byte[zzv()];
|
||
|
zzael zzC = zzael.zzC(bArr);
|
||
|
zzK(zzC);
|
||
|
zzC.zzD();
|
||
|
return new zzaea(bArr);
|
||
|
} catch (IOException e) {
|
||
|
String name = getClass().getName();
|
||
|
StringBuilder sb = new StringBuilder("Serializing ");
|
||
|
sb.append(name);
|
||
|
sb.append(" to a ByteString threw an IOException (should never happen).");
|
||
|
throw new RuntimeException(sb.toString(), e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public int zzr(zzagr zzagrVar) {
|
||
|
throw null;
|
||
|
}
|
||
|
}
|