package com.google.common.collect; import com.google.common.base.Preconditions; import java.util.ArrayDeque; import java.util.Collections; import java.util.Queue; /* loaded from: classes2.dex */ class ConsumingQueueIterator extends AbstractIterator { private final Queue queue; ConsumingQueueIterator(T... tArr) { ArrayDeque arrayDeque = new ArrayDeque(tArr.length); this.queue = arrayDeque; Collections.addAll(arrayDeque, tArr); } /* JADX INFO: Access modifiers changed from: package-private */ public ConsumingQueueIterator(Queue queue) { this.queue = (Queue) Preconditions.checkNotNull(queue); } @Override // com.google.common.collect.AbstractIterator public T computeNext() { return this.queue.isEmpty() ? endOfData() : this.queue.remove(); } }