Initial commit
This commit is contained in:
37
sources/com/bumptech/glide/signature/ObjectKey.java
Normal file
37
sources/com/bumptech/glide/signature/ObjectKey.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.bumptech.glide.signature;
|
||||
|
||||
import com.bumptech.glide.load.Key;
|
||||
import com.bumptech.glide.util.Preconditions;
|
||||
import java.security.MessageDigest;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ObjectKey implements Key {
|
||||
private final Object b;
|
||||
|
||||
public ObjectKey(Object obj) {
|
||||
Preconditions.a(obj);
|
||||
this.b = obj;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.Key
|
||||
public void a(MessageDigest messageDigest) {
|
||||
messageDigest.update(this.b.toString().getBytes(Key.a));
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.Key
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ObjectKey) {
|
||||
return this.b.equals(((ObjectKey) obj).b);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.Key
|
||||
public int hashCode() {
|
||||
return this.b.hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ObjectKey{object=" + this.b + '}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user