package com.google.android.gms.internal.clearcut; import java.io.IOException; import java.io.Serializable; import java.nio.charset.Charset; import java.util.Iterator; /* loaded from: classes2.dex */ public abstract class zzbb implements Serializable, Iterable { public static final zzbb zzfi = new zzbi(zzci.zzkt); private static final zzbf zzfj; private int zzfk = 0; public abstract boolean equals(Object obj); public abstract int size(); protected abstract int zza(int i, int i2, int i3); public abstract zzbb zza(int i, int i2); protected abstract String zza(Charset charset); /* JADX INFO: Access modifiers changed from: package-private */ public abstract void zza(zzba zzbaVar) throws IOException; public abstract boolean zzaa(); public abstract byte zzj(int i); public final String zzz() { return size() == 0 ? "" : zza(zzci.UTF_8); } /* JADX INFO: Access modifiers changed from: protected */ public final int zzab() { return this.zzfk; } public final String toString() { return String.format("", Integer.toHexString(System.identityHashCode(this)), Integer.valueOf(size())); } @Override // java.lang.Iterable public /* synthetic */ Iterator iterator() { return new zzbc(this); } public final int hashCode() { int i = this.zzfk; if (i == 0) { int size = size(); i = zza(size, 0, size); if (i == 0) { i = 1; } this.zzfk = i; } return i; } /* JADX INFO: Access modifiers changed from: package-private */ public static zzbg zzk(int i) { return new zzbg(i, null); } public static zzbb zzf(String str) { return new zzbi(str.getBytes(zzci.UTF_8)); } public static zzbb zzb(byte[] bArr, int i, int i2) { return new zzbi(zzfj.zzc(bArr, i, i2)); } /* JADX INFO: Access modifiers changed from: package-private */ public static int zzb(int i, int i2, int i3) { int i4 = i2 - i; if ((i | i2 | i4 | (i3 - i2)) >= 0) { return i4; } if (i < 0) { StringBuilder sb = new StringBuilder(32); sb.append("Beginning index: "); sb.append(i); sb.append(" < 0"); throw new IndexOutOfBoundsException(sb.toString()); } if (i2 < i) { StringBuilder sb2 = new StringBuilder(66); sb2.append("Beginning index larger than ending index: "); sb2.append(i); sb2.append(", "); sb2.append(i2); throw new IndexOutOfBoundsException(sb2.toString()); } StringBuilder sb3 = new StringBuilder(37); sb3.append("End index: "); sb3.append(i2); sb3.append(" >= "); sb3.append(i3); throw new IndexOutOfBoundsException(sb3.toString()); } static { zzbc zzbcVar = null; zzfj = zzaw.zzx() ? new zzbj(zzbcVar) : new zzbd(zzbcVar); } }