54 lines
1.5 KiB
Java
54 lines
1.5 KiB
Java
package com.bumptech.glide.load;
|
|
|
|
import androidx.collection.ArrayMap;
|
|
import androidx.collection.SimpleArrayMap;
|
|
import com.bumptech.glide.util.CachedHashCodeArrayMap;
|
|
import java.security.MessageDigest;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class Options implements Key {
|
|
private final ArrayMap<Option<?>, Object> b = new CachedHashCodeArrayMap();
|
|
|
|
public void a(Options options) {
|
|
this.b.a((SimpleArrayMap<? extends Option<?>, ? extends Object>) options.b);
|
|
}
|
|
|
|
@Override // com.bumptech.glide.load.Key
|
|
public boolean equals(Object obj) {
|
|
if (obj instanceof Options) {
|
|
return this.b.equals(((Options) obj).b);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override // com.bumptech.glide.load.Key
|
|
public int hashCode() {
|
|
return this.b.hashCode();
|
|
}
|
|
|
|
public String toString() {
|
|
return "Options{values=" + this.b + '}';
|
|
}
|
|
|
|
public <T> Options a(Option<T> option, T t) {
|
|
this.b.put(option, t);
|
|
return this;
|
|
}
|
|
|
|
public <T> T a(Option<T> option) {
|
|
return this.b.containsKey(option) ? (T) this.b.get(option) : option.a();
|
|
}
|
|
|
|
@Override // com.bumptech.glide.load.Key
|
|
public void a(MessageDigest messageDigest) {
|
|
for (int i = 0; i < this.b.size(); i++) {
|
|
a(this.b.b(i), this.b.d(i), messageDigest);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
private static <T> void a(Option<T> option, Object obj, MessageDigest messageDigest) {
|
|
option.a((Option<T>) obj, messageDigest);
|
|
}
|
|
}
|