package com.google.android.gms.common.data; import android.database.CharArrayBuffer; import android.net.Uri; import com.google.android.gms.common.internal.Objects; import com.google.android.gms.common.internal.Preconditions; /* loaded from: classes.dex */ public abstract class DataBufferRef { protected final DataHolder mDataHolder; protected int mDataRow; private int zaa; public DataBufferRef(DataHolder dataHolder, int i) { this.mDataHolder = (DataHolder) Preconditions.checkNotNull(dataHolder); zaa(i); } protected void copyToBuffer(String str, CharArrayBuffer charArrayBuffer) { this.mDataHolder.zac(str, this.mDataRow, this.zaa, charArrayBuffer); } public boolean equals(Object obj) { if (!(obj instanceof DataBufferRef)) { return false; } DataBufferRef dataBufferRef = (DataBufferRef) obj; return Objects.equal(Integer.valueOf(dataBufferRef.mDataRow), Integer.valueOf(this.mDataRow)) && Objects.equal(Integer.valueOf(dataBufferRef.zaa), Integer.valueOf(this.zaa)) && dataBufferRef.mDataHolder == this.mDataHolder; } protected boolean getBoolean(String str) { return this.mDataHolder.getBoolean(str, this.mDataRow, this.zaa); } protected byte[] getByteArray(String str) { return this.mDataHolder.getByteArray(str, this.mDataRow, this.zaa); } protected double getDouble(String str) { return this.mDataHolder.zaa(str, this.mDataRow, this.zaa); } protected float getFloat(String str) { return this.mDataHolder.zab(str, this.mDataRow, this.zaa); } protected int getInteger(String str) { return this.mDataHolder.getInteger(str, this.mDataRow, this.zaa); } protected long getLong(String str) { return this.mDataHolder.getLong(str, this.mDataRow, this.zaa); } protected String getString(String str) { return this.mDataHolder.getString(str, this.mDataRow, this.zaa); } public boolean hasColumn(String str) { return this.mDataHolder.hasColumn(str); } protected boolean hasNull(String str) { return this.mDataHolder.hasNull(str, this.mDataRow, this.zaa); } public int hashCode() { int i = this.mDataRow; int i2 = this.zaa; return Objects.hashCode(Integer.valueOf(i), Integer.valueOf(i2), this.mDataHolder); } public boolean isDataValid() { return !this.mDataHolder.isClosed(); } protected Uri parseUri(String str) { String string = this.mDataHolder.getString(str, this.mDataRow, this.zaa); if (string == null) { return null; } return Uri.parse(string); } /* JADX INFO: Access modifiers changed from: protected */ public final void zaa(int i) { boolean z = false; if (i >= 0 && i < this.mDataHolder.getCount()) { z = true; } Preconditions.checkState(z); this.mDataRow = i; this.zaa = this.mDataHolder.getWindowIndex(i); } protected int getDataRow() { return this.mDataRow; } }