300 lines
8.4 KiB
Java
300 lines
8.4 KiB
Java
|
package o;
|
||
|
|
||
|
import java.lang.ref.ReferenceQueue;
|
||
|
import java.lang.ref.WeakReference;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.Collection;
|
||
|
import java.util.Enumeration;
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Hashtable;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
|
||
|
/* renamed from: o.gku, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class C15234gku extends Hashtable {
|
||
|
private final ReferenceQueue d = new ReferenceQueue();
|
||
|
private int c = 0;
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Map
|
||
|
public final boolean containsKey(Object obj) {
|
||
|
return super.containsKey(new LWm(obj, (byte) 0));
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary
|
||
|
public final Enumeration elements() {
|
||
|
a();
|
||
|
return super.elements();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Map
|
||
|
public final Set entrySet() {
|
||
|
a();
|
||
|
Set<Map.Entry> entrySet = super.entrySet();
|
||
|
HashSet hashSet = new HashSet();
|
||
|
for (Map.Entry entry : entrySet) {
|
||
|
Object obj = ((LWm) entry.getKey()).a.get();
|
||
|
Object value = entry.getValue();
|
||
|
if (obj != null) {
|
||
|
hashSet.add(new Sts(obj, value, (byte) 0));
|
||
|
}
|
||
|
}
|
||
|
return hashSet;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary, java.util.Map
|
||
|
public final Object get(Object obj) {
|
||
|
return super.get(new LWm(obj, (byte) 0));
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary
|
||
|
public final Enumeration keys() {
|
||
|
a();
|
||
|
return new C15208gkB(this, super.keys());
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Map
|
||
|
public final Set keySet() {
|
||
|
a();
|
||
|
Set keySet = super.keySet();
|
||
|
HashSet hashSet = new HashSet();
|
||
|
Iterator it = keySet.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
Object obj = ((LWm) it.next()).a.get();
|
||
|
if (obj != null) {
|
||
|
hashSet.add(obj);
|
||
|
}
|
||
|
}
|
||
|
return hashSet;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary, java.util.Map
|
||
|
public final Object put(Object obj, Object obj2) {
|
||
|
Object put;
|
||
|
synchronized (this) {
|
||
|
if (obj == null) {
|
||
|
throw new NullPointerException("Null keys are not allowed");
|
||
|
}
|
||
|
if (obj2 == null) {
|
||
|
throw new NullPointerException("Null values are not allowed");
|
||
|
}
|
||
|
int i = this.c;
|
||
|
int i2 = i + 1;
|
||
|
this.c = i2;
|
||
|
byte b = 0;
|
||
|
if (i > 100) {
|
||
|
a();
|
||
|
this.c = 0;
|
||
|
} else if (i2 % 10 == 0) {
|
||
|
e();
|
||
|
}
|
||
|
put = super.put(new LWm(obj, this.d, b), obj2);
|
||
|
}
|
||
|
return put;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Map
|
||
|
public final void putAll(Map map) {
|
||
|
if (map != null) {
|
||
|
for (Map.Entry entry : map.entrySet()) {
|
||
|
put(entry.getKey(), entry.getValue());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Map
|
||
|
public final Collection values() {
|
||
|
a();
|
||
|
return super.values();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary, java.util.Map
|
||
|
public final Object remove(Object obj) {
|
||
|
Object remove;
|
||
|
synchronized (this) {
|
||
|
int i = this.c;
|
||
|
int i2 = i + 1;
|
||
|
this.c = i2;
|
||
|
byte b = 0;
|
||
|
if (i > 100) {
|
||
|
a();
|
||
|
this.c = 0;
|
||
|
} else if (i2 % 10 == 0) {
|
||
|
e();
|
||
|
}
|
||
|
remove = super.remove(new LWm(obj, b));
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary, java.util.Map
|
||
|
public final boolean isEmpty() {
|
||
|
a();
|
||
|
return super.isEmpty();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable, java.util.Dictionary, java.util.Map
|
||
|
public final int size() {
|
||
|
a();
|
||
|
return super.size();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable
|
||
|
public final String toString() {
|
||
|
a();
|
||
|
return super.toString();
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Hashtable
|
||
|
protected final void rehash() {
|
||
|
a();
|
||
|
super.rehash();
|
||
|
}
|
||
|
|
||
|
private void a() {
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
synchronized (this.d) {
|
||
|
while (true) {
|
||
|
RVV rvv = (RVV) this.d.poll();
|
||
|
if (rvv == null) {
|
||
|
break;
|
||
|
} else {
|
||
|
arrayList.add(rvv.d);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
int size = arrayList.size();
|
||
|
for (int i = 0; i < size; i++) {
|
||
|
super.remove(arrayList.get(i));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void e() {
|
||
|
synchronized (this.d) {
|
||
|
RVV rvv = (RVV) this.d.poll();
|
||
|
if (rvv != null) {
|
||
|
super.remove(rvv.d);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.gku$Sts */
|
||
|
/* loaded from: classes6.dex */
|
||
|
static final class Sts implements Map.Entry {
|
||
|
private final Object c;
|
||
|
private final Object d;
|
||
|
|
||
|
/* synthetic */ Sts(Object obj, Object obj2, byte b) {
|
||
|
this(obj, obj2);
|
||
|
}
|
||
|
|
||
|
private Sts(Object obj, Object obj2) {
|
||
|
this.c = obj;
|
||
|
this.d = obj2;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (obj == null || !(obj instanceof Map.Entry)) {
|
||
|
return false;
|
||
|
}
|
||
|
Map.Entry entry = (Map.Entry) obj;
|
||
|
if (getKey() == null) {
|
||
|
if (entry.getKey() != null) {
|
||
|
return false;
|
||
|
}
|
||
|
} else if (!getKey().equals(entry.getKey())) {
|
||
|
return false;
|
||
|
}
|
||
|
if (getValue() == null) {
|
||
|
if (entry.getValue() != null) {
|
||
|
return false;
|
||
|
}
|
||
|
} else if (!getValue().equals(entry.getValue())) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public final int hashCode() {
|
||
|
return (getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() != null ? getValue().hashCode() : 0);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public final Object setValue(Object obj) {
|
||
|
throw new UnsupportedOperationException("Entry.setValue is not supported.");
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public final Object getValue() {
|
||
|
return this.d;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Map.Entry
|
||
|
public final Object getKey() {
|
||
|
return this.c;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.gku$LWm */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static final class LWm {
|
||
|
final WeakReference a;
|
||
|
private final int c;
|
||
|
|
||
|
/* synthetic */ LWm(Object obj, byte b) {
|
||
|
this(obj);
|
||
|
}
|
||
|
|
||
|
/* synthetic */ LWm(Object obj, ReferenceQueue referenceQueue, byte b) {
|
||
|
this(obj, referenceQueue);
|
||
|
}
|
||
|
|
||
|
private LWm(Object obj) {
|
||
|
this.a = new WeakReference(obj);
|
||
|
this.c = obj.hashCode();
|
||
|
}
|
||
|
|
||
|
private LWm(Object obj, ReferenceQueue referenceQueue) {
|
||
|
this.a = new RVV(obj, referenceQueue, this, (byte) 0);
|
||
|
this.c = obj.hashCode();
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (!(obj instanceof LWm)) {
|
||
|
return false;
|
||
|
}
|
||
|
LWm lWm = (LWm) obj;
|
||
|
Object obj2 = this.a.get();
|
||
|
Object obj3 = lWm.a.get();
|
||
|
if (obj2 == null) {
|
||
|
return obj3 == null && hashCode() == lWm.hashCode();
|
||
|
}
|
||
|
return obj2.equals(obj3);
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
return this.c;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.gku$RVV */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static final class RVV extends WeakReference {
|
||
|
final LWm d;
|
||
|
|
||
|
/* synthetic */ RVV(Object obj, ReferenceQueue referenceQueue, LWm lWm, byte b) {
|
||
|
this(obj, referenceQueue, lWm);
|
||
|
}
|
||
|
|
||
|
private RVV(Object obj, ReferenceQueue referenceQueue, LWm lWm) {
|
||
|
super(obj, referenceQueue);
|
||
|
this.d = lWm;
|
||
|
}
|
||
|
}
|
||
|
}
|