what-the-bank/sources/o/Gzb.java

38 lines
982 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;
/* loaded from: classes.dex */
public final class Gzb<K, V> extends LinkedHashMap<K, V> implements Serializable {
private transient int a;
private int b;
public Gzb(int i, int i2) {
super(i, 0.8f, true);
this.b = i2;
}
@Override // java.util.LinkedHashMap
protected final boolean removeEldestEntry(Map.Entry<K, V> entry) {
return size() > this.b;
}
private void readObject(ObjectInputStream objectInputStream) throws IOException {
this.a = objectInputStream.readInt();
}
private void writeObject(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.writeInt(this.a);
}
protected final Object readResolve() {
int i = this.a;
return new Gzb(i, i);
}
}