mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
26 lines
732 B
Java
26 lines
732 B
Java
|
package com.google.common.collect;
|
||
|
|
||
|
import com.google.common.base.Preconditions;
|
||
|
import java.util.Queue;
|
||
|
import javax.annotation.CheckForNull;
|
||
|
|
||
|
@ElementTypesAreNonnullByDefault
|
||
|
/* loaded from: classes3.dex */
|
||
|
final class ConsumingQueueIterator<T> extends AbstractIterator<T> {
|
||
|
private final Queue<T> queue;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public ConsumingQueueIterator(Queue<T> queue) {
|
||
|
this.queue = (Queue) Preconditions.checkNotNull(queue);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.common.collect.AbstractIterator
|
||
|
@CheckForNull
|
||
|
public T computeNext() {
|
||
|
if (this.queue.isEmpty()) {
|
||
|
return endOfData();
|
||
|
}
|
||
|
return this.queue.remove();
|
||
|
}
|
||
|
}
|