what-the-bank/sources/com/google/common/cache/RemovalNotification.java

28 lines
835 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.common.cache;
import com.google.common.base.Preconditions;
import java.util.AbstractMap;
/* loaded from: classes2.dex */
public final class RemovalNotification<K, V> extends AbstractMap.SimpleImmutableEntry<K, V> {
private static final long serialVersionUID = 0;
private final RemovalCause cause;
public static <K, V> RemovalNotification<K, V> create(K k, V v, RemovalCause removalCause) {
return new RemovalNotification<>(k, v, removalCause);
}
private RemovalNotification(K k, V v, RemovalCause removalCause) {
super(k, v);
this.cause = (RemovalCause) Preconditions.checkNotNull(removalCause);
}
public final boolean wasEvicted() {
return this.cause.wasEvicted();
}
public final RemovalCause getCause() {
return this.cause;
}
}