what-the-bank/sources/com/huawei/hms/common/data/SingleRefDBInnerIter.java

29 lines
970 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.common.data;
import com.huawei.hms.common.internal.Preconditions;
/* loaded from: classes2.dex */
public class SingleRefDBInnerIter<T> extends DBInnerIter<T> {
public SingleRefDBInnerIter(DataBuffer<T> dataBuffer) {
super(dataBuffer);
}
@Override // com.huawei.hms.common.data.DBInnerIter, java.util.Iterator
public T next() {
if (!hasNext()) {
return null;
}
int i = this.index + 1;
this.index = i;
if (i == 0) {
boolean z = this.dataBuffer.get(0) instanceof DataBufferRef;
StringBuilder sb = new StringBuilder("DataBuffer reference of type ");
sb.append(this.dataBuffer.get(0).getClass());
sb.append(" is not movable");
Preconditions.checkState(z, sb.toString());
((DataBufferRef) this.dataBuffer.get(0)).getWindowIndex(this.index);
}
return (T) this.dataBuffer.get(0);
}
}