Initial commit
This commit is contained in:
28
sources/com/google/common/cache/RemovalNotification.java
vendored
Normal file
28
sources/com/google/common/cache/RemovalNotification.java
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.google.common.cache;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.util.AbstractMap;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class RemovalNotification<K, V> extends AbstractMap.SimpleImmutableEntry<K, V> {
|
||||
private static final long serialVersionUID = 0;
|
||||
private final RemovalCause cause;
|
||||
|
||||
private RemovalNotification(K k, V v, RemovalCause removalCause) {
|
||||
super(k, v);
|
||||
Preconditions.a(removalCause);
|
||||
this.cause = removalCause;
|
||||
}
|
||||
|
||||
public static <K, V> RemovalNotification<K, V> create(K k, V v, RemovalCause removalCause) {
|
||||
return new RemovalNotification<>(k, v, removalCause);
|
||||
}
|
||||
|
||||
public RemovalCause getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public boolean wasEvicted() {
|
||||
return this.cause.wasEvicted();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user