package kotlin.jvm.internal; import java.util.NoSuchElementException; import kotlin.collections.BooleanIterator; /* loaded from: classes5.dex */ final class ArrayBooleanIterator extends BooleanIterator { private final boolean[] array; private int index; public ArrayBooleanIterator(boolean[] array) { Intrinsics.checkNotNullParameter(array, "array"); this.array = array; } @Override // java.util.Iterator public boolean hasNext() { return this.index < this.array.length; } @Override // kotlin.collections.BooleanIterator public boolean nextBoolean() { try { boolean[] zArr = this.array; int i = this.index; this.index = i + 1; return zArr[i]; } catch (ArrayIndexOutOfBoundsException e) { this.index--; throw new NoSuchElementException(e.getMessage()); } } }