discord-jadx/app/src/main/java/d0/w/b.java

31 lines
1.3 KiB
Java

package d0.w;
import d0.z.d.m;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.CoroutineContext.Element;
import kotlin.jvm.functions.Function1;
/* compiled from: CoroutineContextImpl.kt */
public abstract class b<B extends CoroutineContext.Element, E extends B> implements CoroutineContext.Key<E> {
public final CoroutineContext.Key<?> a;
public final Function1<CoroutineContext.Element, E> b;
/* JADX WARN: Multi-variable type inference failed */
/* JADX DEBUG: Type inference failed for r2v1. Raw type applied. Possible types: kotlin.coroutines.CoroutineContext$Key<?> */
public b(CoroutineContext.Key<B> key, Function1<? super CoroutineContext.Element, ? extends E> function1) {
m.checkNotNullParameter(key, "baseKey");
m.checkNotNullParameter(function1, "safeCast");
this.b = function1;
this.a = key instanceof b ? (CoroutineContext.Key<B>) ((b) key).a : key;
}
public final boolean isSubKey$kotlin_stdlib(CoroutineContext.Key<?> key) {
m.checkNotNullParameter(key, "key");
return key == this || this.a == key;
}
public final E tryCast$kotlin_stdlib(CoroutineContext.Element element) {
m.checkNotNullParameter(element, "element");
return this.b.invoke(element);
}
}