jimu-decompiled/sources/com/google/common/cache/RemovalNotification.java
2025-05-13 19:24:51 +02:00

29 lines
818 B
Java

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();
}
}