package androidx.compose.runtime;

import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
final class DataIterator implements Iterable<Object>, Iterator<Object>, K4.a {
    private final int end;
    private int index;
    private final int start;
    private final SlotTable table;

    public DataIterator(SlotTable slotTable, int i6) {
        this.table = slotTable;
        int i7 = slotTable.getGroups()[(i6 * 5) + 4];
        this.start = i7;
        int i8 = i6 + 1;
        this.end = i8 < slotTable.getGroupsSize() ? slotTable.getGroups()[(i8 * 5) + 4] : slotTable.getSlotsSize();
        this.index = i7;
    }

    public final int getEnd() {
        return this.end;
    }

    public final int getIndex() {
        return this.index;
    }

    public final int getStart() {
        return this.start;
    }

    public final SlotTable getTable() {
        return this.table;
    }

    @Override // java.util.Iterator
    public boolean hasNext() {
        return this.index < this.end;
    }

    @Override // java.lang.Iterable
    public Iterator<Object> iterator() {
        return this;
    }

    @Override // java.util.Iterator
    public Object next() {
        int i6 = this.index;
        Object obj = (i6 < 0 || i6 >= this.table.getSlots().length) ? null : this.table.getSlots()[this.index];
        this.index++;
        return obj;
    }

    @Override // java.util.Iterator
    public void remove() {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    public final void setIndex(int i6) {
        this.index = i6;
    }
}
