package com.huawei.hms.common.data; import com.huawei.hms.common.internal.Preconditions; import java.util.Iterator; /* loaded from: classes2.dex */ public class DBInnerIter implements Iterator { protected final DataBuffer dataBuffer; protected int index = -1; public DBInnerIter(DataBuffer dataBuffer) { Preconditions.checkNotNull(dataBuffer, "dataBuffer cannot be null"); this.dataBuffer = dataBuffer; } @Override // java.util.Iterator public boolean hasNext() { return this.index + 1 < this.dataBuffer.getCount(); } @Override // java.util.Iterator public O next() { if (!hasNext()) { return null; } DataBuffer dataBuffer = this.dataBuffer; int i = this.index + 1; this.index = i; return dataBuffer.get(i); } }