69 lines
2.3 KiB
Java
69 lines
2.3 KiB
Java
|
package com.google.android.gms.common.data;
|
||
|
|
||
|
import com.google.android.gms.common.data.DataBufferObserver;
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Iterator;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class DataBufferObserverSet implements DataBufferObserver, DataBufferObserver.Observable {
|
||
|
private HashSet<DataBufferObserver> zaa = new HashSet<>();
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver.Observable
|
||
|
public final void addObserver(DataBufferObserver dataBufferObserver) {
|
||
|
this.zaa.add(dataBufferObserver);
|
||
|
}
|
||
|
|
||
|
public final void clear() {
|
||
|
this.zaa.clear();
|
||
|
}
|
||
|
|
||
|
public final boolean hasObservers() {
|
||
|
return !this.zaa.isEmpty();
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||
|
public final void onDataChanged() {
|
||
|
Iterator<DataBufferObserver> it = this.zaa.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
it.next().onDataChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||
|
public final void onDataRangeChanged(int i, int i2) {
|
||
|
Iterator<DataBufferObserver> it = this.zaa.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
it.next().onDataRangeChanged(i, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||
|
public final void onDataRangeInserted(int i, int i2) {
|
||
|
Iterator<DataBufferObserver> it = this.zaa.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
it.next().onDataRangeInserted(i, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||
|
public final void onDataRangeMoved(int i, int i2, int i3) {
|
||
|
Iterator<DataBufferObserver> it = this.zaa.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
it.next().onDataRangeMoved(i, i2, i3);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||
|
public final void onDataRangeRemoved(int i, int i2) {
|
||
|
Iterator<DataBufferObserver> it = this.zaa.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
it.next().onDataRangeRemoved(i, i2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.common.data.DataBufferObserver.Observable
|
||
|
public final void removeObserver(DataBufferObserver dataBufferObserver) {
|
||
|
this.zaa.remove(dataBufferObserver);
|
||
|
}
|
||
|
}
|